Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Changing filename extentions

by gav^ (Curate)
on Jul 24, 2002 at 17:34 UTC ( [id://184950]=note: print w/replies, xml ) Need Help??


in reply to Changing filename extentions

Hmm. Your code isn't even remotely valid perl. Perhaps you should look at the documentation a bit more?

Here is something that would work

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"); } }

gav^

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://184950]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (5)
As of 2024-04-19 21:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found