use Scalar::Util qw(openhandle);
if (openhandle($LogFile)){--do something with open file--}
else{--do something else: file is not open)}
_________________________________
In theory, there is no difference between theory and practice. In practice, there is. [attributed to Yogi Berra]