Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Parallel processing two arrays with different numbers of elements

by farang (Chaplain)
on Sep 15, 2013 at 00:56 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1054143]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (7)
As of 2024-04-19 07:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found