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

Re: file dies instantly

by rjt (Curate)
on Jul 24, 2013 at 13:14 UTC ( [id://1046107]=note: print w/replies, xml ) Need Help??


in reply to file dies instantly

See open, -X, and $!.

if (not -e $filename) { say "`$filename' does not exist"; # Your code here. However, see perldoc -f -X # for additional test operators you will # probably want to use in addition to "exists" } # OR my $fh; if (not open $fh, '<', $filename) { say "Could not open `$filename': $!"; # Your code here. }

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (5)
As of 2024-04-18 23:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found