Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^2: Check for an empty file

by ChuckularOne (Parson)
on Sep 23, 2011 at 12:36 UTC ( #927542=note: print w/ replies, xml ) Need Help??


in reply to Re: Check for an empty file
in thread Check for an empty file

I had some trouble with this a while back. -s returns a zero if the file is either zero bytes or nonexistent. It got a bit confusing until I worked out what was happening.


Comment on Re^2: Check for an empty file
Re^3: Check for an empty file
by ikegami (Pope) on Sep 23, 2011 at 16:35 UTC

    Actually, it returns undef (and sets $!) if the file is non-existent.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (3)
As of 2015-07-05 06:06 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 (60 votes), past polls