in reply to Merge 2 strings like a zip
Use a CPAN module! Preferably one that has a method that does what you want, and is called what you imagine it should be :-)
#!/usr/bin/env perl use strict; use warnings; use List::MoreUtils qw/ zip /; my @a1 = split('', 'ABCDEFGHIJ'); my @a2 = split('', 'abcde'); no warnings qw/ uninitialized /; print zip @a1, @a2; use warnings; __END__
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Merge 2 strings like a zip
by BrowserUk (Patriarch) on Jul 09, 2015 at 03:11 UTC | |
by SimonPratt (Friar) on Jul 09, 2015 at 10:43 UTC | |
by 1nickt (Canon) on Jul 09, 2015 at 04:03 UTC | |
by roboticus (Chancellor) on Jul 09, 2015 at 10:07 UTC | |
by 1nickt (Canon) on Jul 09, 2015 at 11:58 UTC | |
Re^2: Merge 2 strings like a zip
by Athanasius (Archbishop) on Jul 09, 2015 at 03:00 UTC | |
Re^2: Merge 2 strings like a zip
by tel2 (Pilgrim) on Jul 09, 2015 at 05:47 UTC | |
by 1nickt (Canon) on Jul 09, 2015 at 10:10 UTC |