#!/usr/bin/perl # http://perlmonks.org/?node_id=1133857 use warnings; use strict; print zip("ABCDEFGHIJ", "abcde"), "\n"; sub zip { my ($str1, $str2) = @_; $str1 =~ s/.\K/ substr $str2, 0, 1, ''/gesr; }
In reply to Re: Merge 2 strings like a zip
by Anonymous Monk
in thread Merge 2 strings like a zip
by tel2
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |