in reply to Re: How do I pass $1 to s///?
in thread How do I pass $1 to s///?

Slightly nicer as...
(my $text = $_[0]) =~ s/$_[1]/$_[2]/ee;

Replies are listed 'Best First'.
Re^3: How do I pass $1 to s///?
by ikegami (Patriarch) on Jan 06, 2006 at 17:25 UTC
    I call that uglier since it hides the eval. eval EXPR is something that should be glaring, blinking and alarming.