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;
In reply to Re: search and replace from array values
by blazar
in thread search and replace from array values
by scottdware
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |