Is this what you're looking for?... foreach $word (@file) { if ((my $new = $word) =~ s/\.txt$//) { rename($word, $new) or die "unable to rename $word to $new: $!\n"; } }
In reply to Re: Renaming file without forward slash
by pc88mxer
in thread Renaming file without forward slash
by Ball_22_11
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |