Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
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 wandering the Monastery: (17)
As of 2015-07-07 15:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (90 votes), past polls