Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
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 meditating upon the Monastery: (6)
As of 2015-07-04 07:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (58 votes), past polls