in reply to AWTDI: Renaming files using regexp
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"; }
|
|---|