in reply to Re^2: Having a "default" hash value!
in thread Having a "default" hash value!

My comment about "deleting the right angle bracket" was not about the escape codes, which always use a single left-square bracket after the ascii "esc" character, because... well, whoever thought it up must have felt it was a good idea at the time.

I was pointing out that your regex substitution went like this:

s/(^.*<)\:([a-z]+)>/$1$hash{$2}/;
Note that you are keeping the left-angle bracket ("<") as part of the first capture ($1), but you are not keeping the associated right-angle bracket (">") -- that one is being deleted, because it's part of the matched pattern, but not part of the replacement string.

If that's what you want, fine. I just thought it looked a bit like a bug.

Replies are listed 'Best First'.
Re^4: Having a "default" hash value!
by Ace128 (Hermit) on Mar 04, 2006 at 17:58 UTC
    Ah. Sorry then. Well, the code is somewhat modified from the original, so I may have missed something...