Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
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 taking refuge in the Monastery: (7)
As of 2020-09-29 11:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    If at first I donít succeed, I Ö










    Results (146 votes). Check out past polls.

    Notices?