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
In reply to Re: Re: Daft Regexp
by jsprat
in thread Daft Regexp
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |