Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^2: hash assignment wierdness

by shmem (Chancellor)
on Apr 21, 2007 at 12:33 UTC ( #611289=note: print w/replies, xml ) Need Help??


in reply to Re: hash assignment wierdness
in thread hash assignment wierdness

The output of Data::Dumper is misleading here, as it looks like undef was assigned to the value, not the key. But it's the key that gets the scalar:
qwurx [shmem] ~ > perl -le '%h = "one"; print "$_ => $h{$_}" for keys +%h' one =>

--shmem

_($_=" "x(1<<5)."?\n".q·/)Oo.  G°\        /
                              /\_¯/(q    /
----------------------------  \__(m.====·.(_("always off the crowd"))."·
");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (6)
As of 2021-04-21 08:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?