in reply to Changing filename extentions
Since you're renaming in the same directory, using File::Copy is overkill. The use of system is inefficient when Perl has a rename function built in, and using readdir for this purpose is probably unnecessary.
I think it was Larry Wall that pushed a real simple command-line regex-based "rename" utility like this:rename($_, lc($_)) foreach <*.HTM{,L}>; # yes, this is portable
Which would let you run something like:$op = shift or die "Usage: rename expr [files]\n"; chomp(@ARGV = <STDIN>) unless @ARGV; for (@ARGV) { $was = $_; eval $op; die if $@; rename($was, $_) unless $was eq $_; }
rename '$_ = lc' *.HTM *.HTML
In Section
Seekers of Perl Wisdom