Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
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?
[Discipulus]: Eily adjust the shot: i'll be at seaside when it will happen
[Eily]: oh, I'll have to find something else then, don't want to litter the sea. Fireworks maybe?
Eily time to eat

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (10)
As of 2017-07-27 10:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I came, I saw, I ...
























    Results (409 votes). Check out past polls.