Just because I haven't seen anyone suggest it yet, you should be able to use substr and rindex to good effect here:
for (@files) { my $copy = $_; substr($_,0,rindex($_,".")) =~ tr/./_/; print "Change: $copy to $_\n"; }
In reply to Re: AWTDI: Renaming files using regexp
by duff
in thread AWTDI: Renaming files using regexp
by nimdokk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |