Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Re: Daft Regexp

by jsprat (Curate)
on Aug 05, 2003 at 01:21 UTC ( [id://280855]=note: print w/replies, xml ) Need Help??


in reply to Re: Daft Regexp
in thread Daft Regexp

The problem is not the regex. Take a look at the values of $newname and $newdirname and the error messages. Look at the ouptut after adding

rename ... or die "Error renaming $newname: $!"; #use $newdirname where appropriate

to each rename statement.

Since you are renaming _every_ file and directory, the whole rename sequence is practically begging to be taken out of the if/elsif statement.

PS: You probably want to take a look at File::Find

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (2)
As of 2024-04-20 04:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found