Except that I intend to replace the print with an appropriate rename line. I was wondering if there was some kind of one liner that would accomplish the same thing or a neater way of doing it?my @files = <*.mp3>; for my $file (@files) { my $file2; ($file2 = $file) =~ s/^(..).*/$1_my_guitar.mp3/; print $file . " " . $file2 . "\n"; }
In reply to renaming files by sueme
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |