The /e modifier says to treat the right-hand side of the substitution as an expression. But $1$fruitcolors{$2}$3 isn't a valid Perl expression. To make it valid, add string concatenation operators, as follows: s/(apple)(banana)(chocolate)/$1 . $fruitcolors{$2} . $3/ie;
In reply to Re: Expressionless :
by dws
in thread Expression evaluation in search and replace regex
by JojoLinkyBob
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |