in reply to Re: Filename fixer
in thread Filename fixer
Another thing is that I don't really like using the foreach $variable (@array) {} syntax... I rather use map $variable { } @array if I can't use the $_ variable.. But thanks anyway! spm.foreach (<*>) { (my $new = lc) =~ s/ |%20/_/g; $new =~ s/%25//g; rename($_, $new) or warn "can't rename $_ to $new: $!\n"; }
|
|---|