in reply to Re: -s testing for empty file; works on local, but not on remote
in thread -s testing for empty file; works on local, but not on remote
3 - if you "open my $filehandle..." you can treat $filehandle as any other scalar variable, you could probably use simply while ($filehandle) instead while (<$FILEHANDLE>) unless you have a reason to do this (that I'm probably missing)
while ($filehandle) loops while the variable $filehandle contains a TRUE value.
while (<$FILEHANDLE>) is short for while ( defined( $_ = readline $FILEHANDLE ) ) and it loops until readline returns undef.