Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
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 }


Comment on Re: Opening a File If It Exists
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (11)
As of 2014-07-29 12:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (217 votes), past polls