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

Re^2: Merging arrays

by smls (Friar)
on Jun 27, 2013 at 20:13 UTC ( #1041088=note: print w/replies, xml ) Need Help??

in reply to Re: Merging arrays
in thread Merging arrays

I am going to assume you have a typo in your second array definition

Good point.
If the double "acct4" item in the original code is not a typo but rather intended to demonstrate special handling for duplicate entries, then the OP would need to explain how exactly such cases should be handled.

One possibility would be to strip all duplicate items from the list before merging (e.g. using the uniq function from List::MoreUtils). However, whether that is the correct thing to do would depend on the exact specification of the intended outcome in the general case.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1041088]
[choroba]: Without totally changing the approach, I can't squeeze it more.
[Discipulus]: i'm stuck at 54 ;=( but for me is good enough
[Discipulus]: and even if i lead in primality check, i have 2 chars more than you in iEmirp nums..

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (11)
As of 2017-10-20 09:23 GMT
Find Nodes?
    Voting Booth?
    My fridge is mostly full of:

    Results (260 votes). Check out past polls.