You pull in File::Basename, but then manually extract the extension with a regular expression. And probably doesn't do what you mean if $filename doesn't have an extension in it (in which case $newfile will be (effectively) "$newname.$filename" instead).
The cake is a lie.
The cake is a lie.
The cake is a lie.
In reply to Re^2: rename file
by Fletch
in thread rename file
by frank1
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |