CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner:
How can you check to see if a file already exists?

 



Killian
Deleted

Apr 23, 2001, 4:04 PM

Post #1 of 3 (124 views)
How can you check to see if a file already exists? Can't Post

Is there a way to check to see if a certain file already exists and if it does do something, and if it doesn't do something else?

I tried some different things and they didn't work.



Cure
User

Apr 23, 2001, 5:15 PM

Post #2 of 3 (121 views)
Re: How can you check to see if a file already exists? [In reply to] Can't Post

if (-e 'file.txt') { the file exist}
else {
the file doesn't exist
}



Killian
Deleted

Apr 23, 2001, 5:19 PM

Post #3 of 3 (119 views)
Re: How can you check to see if a file already exists? [In reply to] Can't Post

wow... so simple... I really feel like a n00b now! lol


 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives