in reply to rename 0.3 - now with two extra cupholders
Well, at least you know I'm using it... :-)
While doing a dry run using your sanitize option, I noticed a warning:
I ran it again with -v to print to get this:Use of uninitialized value in concatenation (.) or string at (eval 1) +line 1.
The problem is that the $& is being interpolated. It is uninitialized, hence the warning. Worse, however, is that it doesn't remove dollars and ampersands from filenames. The fix is obvious; just escape the '$' in your character class.Using expression: sub { s/[!"$&()=?`*';<>|_[:cntrl:][:blank:]]+/_/g }
FWIW, this behavior surprised me. Badly surprised me. I blanch at the thought that I may have made this same error countless times. I believe I've even given the advice "there's no need to escape a dollar sign in your character class" many, many times.
-sauoq "My two cents aren't worth a dime.";
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: (bug report) Re: rename 0.3 - now with two extra cupholders
by Aristotle (Chancellor) on Nov 23, 2003 at 12:35 UTC |
In Section
Code Catacombs