in reply to Renaming Files
I strongly recommend File::Find. Here's an example of what it might look like:
Cheers,
Shendal
use File::Find; my $dir = shift || '.'; find \&wanted, $dir; sub wanted { next unless (-f && /\.cfm$/); my $newname = $File::Find::name; $newname =~ s/\.cfm$/.html/; rename $File::Find::name,$newname or die "Unable to rename $File::F +ind::name!"; }
Cheers,
Shendal
|
---|
In Section
Seekers of Perl Wisdom