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

Re^3: Perl Rename

by BrowserUk (Pope)
on Jul 03, 2010 at 11:49 UTC ( #847891=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    rnm "s/Blah Blah - \d{2} - //" "Blah Blah - 01 - Peter.txt" "Blah Blah
    + - 02 - Lois.txt"
    
  2. or download this
    #!/usr/bin/perl -w
    
    ...
      die $@ if $@;
      rename ( $was, $_ ) unless $was eq $_;
    }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://847891]
help
Chatterbox?
[Corion]: Mhrrrr. Some project made changes to a report I ingest. I tell them "the format of the new rows is bad". They change it, without understanding/ knowing what other systems might act on this suffix. While it now works for me, I'm not really happy with ...
[Corion]: ... their approach to changing things and waiting who screams at them.

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (11)
As of 2017-07-24 14:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I came, I saw, I ...
























    Results (354 votes). Check out past polls.