Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Opening a File If It Exists

by The Mad Hatter (Priest)
on Jul 21, 2004 at 17:15 UTC ( #376324=note: print w/replies, xml ) Need Help??


in reply to Opening a File If It Exists

Test for existance using the -e operator. See perldoc -f -X for more info. For example:
if (-e "some_file") { # do your thing }

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://376324]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (6)
As of 2017-02-26 18:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Before electricity was invented, what was the Electric Eel called?






    Results (376 votes). Check out past polls.