Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: How do I test whether a file has some contents or not?

by Anonymous Monk
on Oct 15, 2000 at 12:28 UTC ( [id://36798]=note: print w/replies, xml ) Need Help??


in reply to How do I test whether a file has some contents or not?

if ( -s 'file') { print "file exists and has size > 0\n"; }

Originally posted as a Categorized Answer.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (4)
As of 2024-04-26 06:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found