'print "$_: "; s/foo/bar/ if =~ /^y/i' #### The system cannot find the file specified. #### #!/usr/bin/perl -w use strict; use warnings; use 5.010; # Larry's filename fixer [Cookbook 9.9, mod crt for ActiveState/W10] my $op = shift or die "Usage: perl rename expr [files]\n"; chomp(@ARGV = ) unless @ARGV; @ARGV = map glob, @ARGV; for (@ARGV) { my $was = $_; eval $op; die $@ if $@; rename ($was, $_) unless $was = $_; }