Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re^2: merging two arrays with OR operation

by rsFalse (Hermit)
on Mar 06, 2019 at 12:57 UTC ( #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
Node Status?
node history
Node Type: note [id://1230959]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (7)
As of 2020-01-20 09:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?