Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Parallel processing two arrays with different numbers of elements

by farang (Hermit)
on Sep 15, 2013 at 00:56 UTC ( #1054143=note: print w/ replies, xml ) Need Help??


in reply to Parallel processing two arrays with different numbers of elements

Another possibility, using defined or instead of disabling warnings.

use v5.16; use warnings; my @arr=qw/a b c d e/; my @bar = qw/12 34 56/; my $i = 0; while ($i<($#arr+2)) { say "\t \$i: $i"; say "\t\t ", $arr[$i] // q{}, ", ", $bar[$i] // q{}; ++$i; }


Comment on Re: Parallel processing two arrays with different numbers of elements
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (8)
As of 2014-07-29 21:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (228 votes), past polls