Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: rename files in directory with new extenstion

by damian1301 (Curate)
on Aug 09, 2001 at 08:37 UTC ( [id://103331] : note . print w/replies, xml ) Need Help??


in reply to rename files in directory with new extenstion

you could just do
while(<*.old>){ ($new = $_) =~ s/old$/new/; rename($_,$new); }
And not waste space by bringing all those filenames into an array

$_.=($=+(6<<1));print(chr(my$a=$_));$^H=$_+$_;$_=$^H; print chr($_-39); # Easy but its ok.