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

Re^3: Merging arrays

by LanX (Chancellor)
on Jun 28, 2013 at 13:50 UTC ( #1041258=note: print w/replies, xml ) Need Help??

in reply to Re^2: Merging arrays
in thread Merging arrays

> Why shouldn't one be allowed to end up with data like:

No special reason.

Sometimes one has data structure which have to be unique, then using a hash is handy.

Sometimes not ... I'm just listing another way to do it for one of those loosely defined PM requirements... :)

FWIW I'll change my post to make the restriction clearer ...


The question is rather how to design functional constructs like map which can easily (idiomatically) be used/combined to create nested data-structures which solve all possible requirements (sorted, nested, unique, non-string keys, ...).

Thats more a design than an implementation question, I rarely see people using List::MoreUtils here.

Cheers Rolf

( addicted to the Perl Programming Language)

Replies are listed 'Best First'.
Re^4: Merging arrays
by AnomalousMonk (Canon) on Jun 28, 2013 at 19:26 UTC
    ... loosely defined ... requirements...

    Yes, that's always the tricky bit: to divine what the OPer really wants... or, better yet, needs!

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1041258]
[marto]: at times mine surprise me with this behavior :)
[Corion]: I mean, in a way it would be nicer+easier if they always where that obedient, but it's comforting to see that they are when it matters, at least for now ;)

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (9)
As of 2016-12-08 09:30 GMT
Find Nodes?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:

    Results (138 votes). Check out past polls.