in reply to Renaming Files
When you open and read a directory, the names that you get don't have leading path components. Unless you're chdir()'d to the directory, you'll need to prepend the path before doing operations like -d, -e, or rename().
In your case, that means prepending $line or $newdir.
|
|---|