Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Re: Daft Regexp

by jsprat (Curate)
on Aug 05, 2003 at 01:21 UTC ( #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
Node Status?
node history
Node Type: note [id://280855]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (4)
As of 2020-06-07 07:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you really want to know if there is extraterrestrial life?



    Results (42 votes). Check out past polls.

    Notices?