John W. Krahn wrote:
> chomp;
> if ( /(.*)\.BMP/ ) {
> print "processing image $_ ..\n";
> system( 'mv', $_, "$1.bmp" ) == 0 or die "system 'mv $_' failed:
> $?";
> }
next unless /(.*)\.BMP$/;#anchor it to the end of the string!
print "processing image file: $_\n";
#rename will clobber existing files, so check first!
warn "File exists!: $1.bmp. skipping...\n" && next
if -f "$1.bmp";
# use perl rather than spawning external processes!
rename( $_, "$1.bmp" ) or die "unable to rename file $_: $!";
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]