Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re^2: merging two arrays with OR operation

by rsFalse (Chaplain)
on Mar 06, 2019 at 12:57 UTC ( [id://1230959]=note: print w/replies, xml ) Need Help??


in reply to Re: merging two arrays with OR operation
in thread merging two arrays with OR operation

Same, but with another one variant inside the map, using shift-right op (Shift Operators):
my @result = map { $_ + $array2[ $i++ ] + 1 >> 1 } @array1;

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (6)
As of 2024-03-29 11:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found