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

Re: Re: checking for a file

by Massyn (Hermit)
on Aug 02, 2002 at 14:26 UTC ( #187099=note: print w/replies, xml ) Need Help??


in reply to Re: checking for a file
in thread checking for a file

I'd rather go with
if(-f "/bin/do/foo/$targetFile") { print "is there!\n"; } else { print "someone stoled it...\n"; }
to check if it's actually a file (that exists), as the -e may also return true on a directory.

Replies are listed 'Best First'.
Re: Re: Re: checking for a file
by splitOnce (Acolyte) on Aug 02, 2002 at 14:48 UTC
    Thanks all , I was able to figure it out with the -f ,, thank you again

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (6)
As of 2022-07-04 11:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?