Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: call perl hash function?

by broquaint (Abbot)
on Jan 26, 2003 at 16:30 UTC ( [id://229983]=note: print w/replies, xml ) Need Help??


in reply to call perl hash function?

You can find perl's hashing function used in 5.005 in Abhijit Menon-Sen's article How Hashes Really Work.
HTH

_________
broquaint

Replies are listed 'Best First'.
Re: Re: call perl hash function?
by Aragorn (Curate) on Jan 26, 2003 at 18:06 UTC
    If I recall correctly, the hash function has changed over time. So it may very well be the case that the hash value of "Somestring" is different in Perl 5.005, 5.6.1 and 5.8. Try the following with different Perl versions:

    $ perl -MDevel::Peek -e 'Dump({ key => "value" })'

    and look for the line with

    Elt "key" HASH =

    in it. The hash values are different.

    Arjen

      Good point; this might have tripped me up. Thanks!
Re: Re: call perl hash function?
by whartman (Novice) on Jan 26, 2003 at 21:14 UTC
    Reference gave me what I needed. Thanks!

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (2)
As of 2024-06-15 01:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.