Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re^2: -s testing for empty file; works on local, but not on remote

by jwkrahn (Monsignor)
on Sep 26, 2011 at 23:33 UTC ( #927976=note: print w/ replies, xml ) Need Help??


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.


Comment on Re^2: -s testing for empty file; works on local, but not on remote
Select or Download Code
Re^3: -s testing for empty file; works on local, but not on remote
by pvaldes (Chaplain) on Sep 27, 2011 at 08:10 UTC
    aha, now is clear to me, thanks for the explanation

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://927976]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (3)
As of 2014-09-21 11:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (168 votes), past polls