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

Re: Peculiar hash behavior

by AnomalousMonk (Bishop)
on Oct 02, 2021 at 07:16 UTC ( #11137196=note: print w/replies, xml ) Need Help??


in reply to Peculiar hash behavior

For the $h1{(@h)} expression, note that an @array evaluated in scalar context yields the number of elements in the array. In the $h1{(@h)} expression, the @h array of three elements (used as a key/string) is evaluated in scalar context (update: so 3 → "3").


Give a man a fish:  <%-{-{-{-<

Replies are listed 'Best First'.
Re^2: Peculiar hash behavior
by dd-b (Monk) on Oct 05, 2021 at 02:35 UTC

    Yes, of course it does. Sigh.

    Bad luck for me that my test data started with '3', so it was easy to not realize that well-known thing was happening.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (None)
    As of 2022-01-26 06:25 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?
      In 2022, my preferred method to securely store passwords is:












      Results (69 votes). Check out past polls.

      Notices?