< #!/usr/bin/perl -w ## ## use strict ; my $dir = 'ParticleAcquisitionDataImages/'; my @fileList = glob "${dir}*jmg*"; foreach (@fileList) { next if -d; my $oldname = $_; # $_=substr($_, 0, 1, ''); # s/.//; s/^.(.*).$/$1/; rename $oldname, $_ or $_ = $oldname, warn $_, ' not renamed: ', $!; } close >