Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Using Splice with Two Arrays within a loop

by hdb (Prior)
on Jun 10, 2013 at 15:54 UTC ( #1038105=note: print w/ replies, xml ) Need Help??


in reply to Using Splice with Two Arrays within a loop

Your function already exists in module List::MoreUtils.

use strict; use warnings; use List::MoreUtils qw{ mesh }; my @first = qw(Can unlock secret); my @second = qw(you the code?); my @mixed = mesh @first, @second; print "Result: @mixed\n";

UPDATE: Again a few seconds too late... davido being faster again!


Comment on Re: Using Splice with Two Arrays within a loop
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1038105]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (13)
As of 2015-07-29 21:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (269 votes), past polls