in reply to Re: s/// in a sub : passing expressions
in thread s/// in a sub : passing expressions

I think you're referring to an old node of mine: Re: How to do regex backreferences within $variable replacement text?. When I used that solution at work, another perl programmer told me I was "too advanced." I don't think that this was very advanced - just a novel way of looking at the problem.

Anyway, that entire thread may be relevant here.

  • Comment on Re^2: s/// in a sub : passing expressions

Replies are listed 'Best First'.
Re^3: s/// in a sub : passing expressions
by Errto (Vicar) on Nov 01, 2005 at 01:41 UTC
    Yes, that's the one. Your solution is neater than mine because it avoids the number variables, and possibly faster (though I can't be bothered to benchmark it), but mine has a small advantage in that you can use it with modifiers such as /i, /g, and /x.