TCLUG Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [TCLUG:8884] converting uppercase to lowercase
Just use perls internal find method: This will take in a list of
directories on the command line and recurse down each one.
#!/usr/local/bin/perl
use strict;
use File::Find;
my $dir = '';
for $dir(@ARGV) {
File::Find::find(\&doit, $dir);
}
exit;
sub doit {
my $filename = $File::Find::name;
my $newfilename = lc($filename);
print "$filename -> $newfilename\n";
rename($filename, $newfilename);
}