in reply to search and replace from array values
that is, you may want to do a more accurate check if %subst can contain, say 0 or '' as a value. Now, how to build the %subst associative array from your lists/arrays? That is left as an exercise to the reader => see perldoc perlsyn.s/\b(\w+)\b/ $subst{$1} || $1/ge;
|
|---|