Ok, try the changedir suggestion from VSarkiss (elsewhere in this thread) at the top of your script. And check the return value of rename like this: rename($filename, $newfile) or warn "Couldn't rename: $filename -> $newfile: $!";
If you get the warning messages even with the chdir, then you have to put a full pathname as arguments for the rename. You can get them if $dir contains your path by putting the filename and pathname together like this: "$dir/$filename"-- Hofmator
In reply to Re5: How can I opendir, replace all files containing a space with .?
by Hofmator
in thread How can I opendir, replace all files containing a space with .?
by nkpgmartin
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |