There's more than one way to do things | |
PerlMonks |
Re: Testing Files and Directoriesby fluxion (Monk) |
on Apr 26, 2004 at 19:06 UTC ( [id://348304]=note: print w/replies, xml ) | Need Help?? |
-e will test true if the file exists, and it'll also return false if the target exists, but isnt a file (directory). The same holds true for -d with respect to directories. Using these, your code would be written as follows:
Roses are red, violets are blue. All my base, are belong to you.
In Section
Seekers of Perl Wisdom
|
|