Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re^3: Perl style... help me figure this out.

by Marshall (Canon)
on Feb 08, 2012 at 22:06 UTC ( [id://952600]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Perl style... help me figure this out.
in thread Perl style... help me figure this out.

EDIT: I should have made it clear that ordering is important and that 'this guy' is a simple man and can only love one thing. I know that this hints that I should be using an array of arrays instead of a hash of arrays, but the key-value relationship is something I would like to preserve if at all possible.

After reading your EDIT, I am confused as to what the requirements really are. What does "ordering is important" mean? Order of "what" exactly?

A hash has no intrinsic "order" to the keys - you should assume that hash keys will come out in any order when you access a hash via (keys %hash) or (keys %$ref_2_hash).

It would help at least me, if you could back up a bit.. Write some more text describing what data you have and the kind of "look-up" that you desire. It could be that excellent solutions are being offered to the "wrong problem".

  • Comment on Re^3: Perl style... help me figure this out.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (3)
As of 2024-04-19 01:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found