Prefix $dirtoget on the filenames. perldoc -f readdir
If you're planning to filetest the return values out of a "readdir", you'd better prepend the directory in question. Otherwise, because we didn't "chdir" there, it would have been testing the wrong file.
foreach my $f ( map { "$dirtoget/$_" } @thefiles ) { ... }
In reply to Re: Problem pulling directories out of an array.
by Fletch
in thread Problem pulling directories out of an array.
by bkiahg
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |