in reply to Expression evaluation in search and replace regex

With /e the second half of s/// is an expression, you must manually concatenate your variables. The first works because there is no need to concatenate a single variable (to what?!). It's an easy enough mistake to make.

UPDATE: Note I explicitly did not say use . because you only need effect a concatenation. TIMTWOTDI, you could also use an interpolating quote.

--
perl -pe "s/\b;([st])/'\1/mg"

Replies are listed 'Best First'.
Re: Re: Expressionless :
by JojoLinkyBob (Scribe) on Jan 20, 2002 at 23:46 UTC
    Doh! I should have known that. Thanks for your rapid response. =~Desertcoder