Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

RE: neither clever nor useful array vs. hash example

by ZZamboni (Curate)
on Jul 03, 2000 at 18:50 UTC ( [id://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

Replies are listed 'Best First'.
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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://20889]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (5)
As of 2024-04-24 20:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found