Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Changing filename extentions

by gav^ (Curate)
on Jul 24, 2002 at 17:34 UTC ( #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^


Comment on Re: Changing filename extentions
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (13)
As of 2014-10-01 09:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    What is your favourite meta-syntactic variable name?














    Results (1 votes), past polls