Sure - the filetests (-f in this case) work on filehandles as well as filenames.
if (-f $test) { print $test "It's a file"; }
See perldoc perlfunc(search for -X) for more info on all the filetest operators.
In reply to Re: valid filehandle
by jsprat
in thread valid filehandle
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |