What you have should tell you if something called /mydir is in the root fs. To see if it is a directory call -d.
my $mydir = '/mydir'; if ( -e $mydir and -d _ ) { print $mydir, ' directory exists.', $/; }
The underscore handle makes -d use the cached stat call from -e.
After Compline,
Zaxo
In reply to Re: directory exists
by Zaxo
in thread directory exists
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |