You'll need a // operator there, otherwise it eats the 0's in $b...
An alternative:
$b = reverse $b; $a =~ s{.\K}{chop $b}sge; print $a;
In reply to Re: The Regex Approach: Merging 2 strings like a zip
by Anonymous Monk
in thread Merge 2 strings like a zip
by tel2
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |