Hi, I need to check to see if a file exists in a
directory, if it does then delete it, else ......

is this the correct syntax?

if (-e $file and -f _) {
system ("del $file") ? print "File $file deleted\n"
: warn "File $file WAS removed: $!\n";


=====
Peter Lemus
Computer Networks Engineer
[EMAIL PROTECTED]
My Dad always tought me; when you do good; expect to receive good; when you do bad; 
expect the bad...sooner or later.

__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/

Reply via email to