in reply to Re^2: within pattern manipulation
in thread within pattern manipulation

By using "x", he changed the meaning of the spaces in your pattern. Fixed:
$sentence =~ s{($phrases)}{ ( my $string = $1 ) =~ tr/ /_/; "%$string%" }ieg;

Replies are listed 'Best First'.
Re^4: within pattern manipulation
by newbio (Beadle) on Sep 18, 2009 at 14:59 UTC
    Very nice. Thank you.