Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Trying to rename files in directory

by tangent (Deacon)
on Feb 15, 2012 at 03:50 UTC ( #953827=note: print w/ replies, xml ) Need Help??


in reply to Trying to rename files in directory

I could be wrong but try it without the "eg" in the substitution:

s/^([^_]+_)(.*)(\.\w{3,4})\z$/$3/;
And then change your warning to:
warn "Couldn't rename $temp_f_name to $renamed_file, $!\n";
to see what else is happening. If that's no good put in
print "About to rename $temp_f_name to $renamed_file\n";
before the rename()


Comment on Re: Trying to rename files in directory
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (6)
As of 2014-08-01 03:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (256 votes), past polls