Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Perl Rename

by Mad_Mac (Beadle)
on Jul 03, 2010 at 08:41 UTC ( #847883=perlquestion: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl -w
    $op = shift or die "Usage: rename expr [files]\n";
    ...
      die $@ if $@;
      rename ( $was, $_ ) unless $was eq $_;
    }
    
  2. or download this
    perl rename.pl 's/Blah Blah - \d{2} - //' *
    perl rename.pl 's/^Blah Blah - \d{2} - //' *
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://847883]
Approved by Corion
Front-paged by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (5)
As of 2014-07-13 10:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (249 votes), past polls