You should bear in mind that in $name you only have the names of the directory entries within the directory you opened with opendir(); in order to use that entry you will need to put the the full path back, so you might have something like:
while(my $name = readdir(ODIR)) { if(-d "C:/$name") { print "## inside if \n"; } }
/J\
In reply to Re: odd behaviour with opendir()
by gellyfish
in thread odd behaviour with opendir()
by barathbr
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |