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

Re: The strangest use of unlink I know of

by Your Mother (Chancellor)
on Feb 28, 2008 at 16:55 UTC ( #670934=note: print w/ replies, xml ) Need Help??

in reply to The strangest use of unlink I know of

A hash won't resolve to HASH(0x814dc30) in list context; that's the stringification of a reference to a hash. Hashes flatten and return their keys and values in list context.

Comment on Re: The strangest use of unlink I know of
Replies are listed 'Best First'.
Re^2: The strangest use of unlink I know of
by w-ber (Hermit) on Feb 28, 2008 at 17:19 UTC

    The cute thing here is that the hash is initialized with a list of one item, a reference to an empty hash. So:

    $ perl -e '%foo = {}; print %foo, "\n";' HASH(0x814dc30)

    and (note the trailing comma, indicating an undefined value):

    $ perl -e '%foo = {}; print join(",", %foo), "\n";' HASH(0x814dc30),

    print "Just Another Perl Adept\n";

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (8)
As of 2015-07-29 08:19 GMT
Find Nodes?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...

    Results (261 votes), past polls