http://qs1969.pair.com?node_id=1008826


in reply to $1 not "freezing" in an addition

Does it work better if you "unreverse" the if condition?
if(s/\(#:(\d+)\)/#/) { return $1 + distance($_); }

As I don't have the whole code, it's a bit difficult to test. And it's just a hunch.

Replies are listed 'Best First'.
Re^2: $1 not "freezing" in an addition
by grondilu (Friar) on Dec 14, 2012 at 12:42 UTC

    Nope. (It was actually initially written as such, anyway)