[tpm] Regex question

arocker at vex.net arocker at vex.net
Wed Jul 9 13:42:30 PDT 2008


>From "Mike Stok":
>
> Maybe I have missed something subtle ;-)
>
....
> I don't think that the suggestion above changes $foo, as all it does
> is a match in list context so $1 gets assigned to $bar if the match
> succeeds.  Have I missed an obvious "gotcha" ?
>
Now I'm not sure; you may well be right. I shouldn't have posted without
proof at hand. However, in a sense that illustrated the point I was trying
to make; it's harder to understand the shorter complex expression than the
simpler one. (There's a trade-off there, as well. Spreading an expression
over too many lines can lead to earlier processes being overlooked or
forgotten.)



More information about the toronto-pm mailing list