% cat x.pl $_ = 'foo'; $lhs = '(.)oo'; $rhs = '\1ar'; eval "s/$lhs/$rhs/"; print "$_\n"; % perl x.pl far %
In reply to RE: How can I combine backreferences and regex interpolation?
by knight
in thread How can I combine backreferences and regex interpolation?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |