hehehe
#!/usr/bin/perl # http://perlmonks.org/?node_id=1133857 use warnings; use strict; print zip("ABCDEFGHIJ", "abcde"), "\n"; sub zip { my ($str1, $str2) = @_; my $len = length $str2; pack("(ax)$len (a)*", split //, $str1) | pack "(xa)$len", split //, +$str2 }
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: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |