Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

RE: neither clever nor useful array vs. hash example

by ZZamboni (Curate)
on Jul 03, 2000 at 18:50 UTC ( #20889=note: print w/ replies, xml ) Need Help??


in reply to (code) neither clever nor useful array vs. hash example

It's not the version of perl that keeps you from doing retrieval in the order of insertion. Hashes are that way by nature. There is no guarantee of the order in which the elements will come out when you use keys or each.

--ZZamboni


Comment on RE: neither clever nor useful array vs. hash example
RE: RE: neither clever nor useful array vs. hash example
by KM (Priest) on Jul 03, 2000 at 19:06 UTC
    On an aside, you can look at japhy's YAPC 19100 talk on making a ordered hash. No real revelations, but is pretty interesting and the technique is useful. It is here.

    Cheers,
    KM

RE: (2) neither clever nor useful array vs. hash example (insertion order retrieval?)
by ybiC (Prior) on Jul 05, 2000 at 07:00 UTC
    Thanks for taking time to comment, ZZamboni. I really should have phrased my "p.s." something like :

    p.s. I played a bit with a module that facilitates Hash insertion order retrieval, but couldn't make it work. Wish I could remember the module - stumbled across it somewhere in O'Reilly Perl CD Bookshelf.

    It's as likely or more that I had bad syntax than a down-level Perl incompatibility. Is nothing important to me at the moment. By the time I expect to pick it back up, hope to be on Debian 2.2 with a newer $^X$]
        "Maybe Tie::IxHash?"

        Yep, that's it - thanks for the link, ZZamboni! README says it "requires: Perl Version 5.003 or later", which shoots down my off-the-cuff guess of version compatibility problem. When I get a chance, will spend a bit more time getting syntax right.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (6)
As of 2014-08-22 04:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (147 votes), past polls