Suppose I have a filehandle $fh. I can check its existence with -e $fh or its file size with -s $fh or a slew of additional informati
$fh
-e $fh
-s $fh
You could use stat() or the File::Stat module.
perldoc -f stat