note
gav^
Hmm. Your code isn't even remotely valid perl. Perhaps you should look at the <a href="http://www.perldoc.com">documentation</a> a bit more?
<p>Here is something that would work
<code>opendir(DIR, $dir) or die "Cannot open directory '$dir': $!";
my @files = readdir(DIR);
close(DIR);
foreach my $file (@files) {
if ($file =~ /\.HTML?$/i) {
system("rename $file \L$file\E");
}
}
</code>
<p>gav^
184945
184945