There's more than one way to do things | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
While I'm not completly sure, the line
print "$dir exists" if ( -e $dir ); should work on all platforms. This is because of perl's unix roots, (gosh are those still showing :)
In unix, anything within the filesystem is a file, it just depends if it s a file file, a directory file, a socket file, etc. etc. On your second question, a quick read through perldoc File::Path leads me to beleive that your code will not work. And further read through the code, perldoc -m File::Path, leads me to believe the opposite, see Tye's post. --SparkeyG --Update: Corrected after reading Tye's post and further investigating the code. In reply to Re: Subtleties of files and directories
by SparkeyG
|
|