Re: "my" not okay for file handle strings?

2002-12-06 Thread Terry Carroll
On Fri, 6 Dec 2002, Terry Carroll wrote: > 2) Is the requirement on the scope of the variable documented anywhere? I > did try to find something on this before posting, and couldn't. Well, I'm a dumb-ass. I checked the FAQ and all through the Camel book, but never checked t

Re: "my" not okay for file handle strings?

2002-12-06 Thread Terry Carroll
ss a third question is, "why have I never run across this before?", but I guess you can't answer that. I usually use "use strict", and therefor declare my variables, and I never use "local," so I'm surprised I haven't run into this before. -- Ter

Re: "my" not okay for file handle strings?

2002-12-06 Thread Terry Carroll
*does* indeed work -- but not if the variable is declared with "my." That's what I can't understand and can't find documented. -- Terry Carroll| Santa Clara, CA | "The parties are advised to chill." [EMAIL PROTECTED] | - Mattel, Inc. v. MC

Re: Idiomatic way to substitute one set of strings for another?

2002-02-23 Thread Terry Carroll
tch: $line =~ s/(%\d\d)/chr(hex($1))/eg; print $line; prints: some s p a c e s, dash%2D, period%2e %7bbracket%7d This is as expected. Okay, so I would expect a similar regex change as I made in the hash-based approach above to work here, too... but it doesn't. $line =~ s/(%[0-8][0-9a-f

Re: Regular expression help

2001-12-01 Thread Terry Carroll
t; Try putting quotes around it so it's treated as a string. > > I thought if the number is too large, it will display something like this > 3e0whatever-number, nevertheless, I will read on this. That would be consistent with matching only the first (\d*), and matching it only to