The -e filetest will give you what you need.
my $filename = 'somefilename'; if (-e $filename) { print "File $filename already exists.\n"; } else { # create the file here... }
In reply to Re: Safe File Handling
by vek
in thread Safe File Handling
by CloneArmyCommander
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |