Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

(bug report) Re: rename 0.3 - now with two extra cupholders

by sauoq (Abbot)
on Nov 23, 2003 at 01:56 UTC ( #309208=note: print w/ replies, xml ) Need Help??


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:

Use of uninitialized value in concatenation (.) or string at (eval 1) +line 1.
I ran it again with -v to print to get this:
Using expression: sub { s/[!"$&()=?`*';<>|_[:cntrl:][:blank:]]+/_/g }
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.

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.";


Comment on (bug report) Re: rename 0.3 - now with two extra cupholders
Select or Download Code
Re: (bug report) Re: rename 0.3 - now with two extra cupholders
by Aristotle (Chancellor) on Nov 23, 2003 at 12:35 UTC
    Yes - a fellow monk had sent me a msg about this a while, so I am aware (he was also going to post a reply here that was on his scratchpad, but which he didn't yet; unfortunately I saved the scratchpad stuff but not his nick :-( ). You are right as per your msg that I knew about it, but that happens with facts you learn but don't use soon enough.. :-)

    Makeshifts last the longest.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (9)
As of 2015-07-06 07:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (70 votes), past polls