Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re^2: Addition of hashes

by morgon (Priest)
on Feb 03, 2017 at 15:30 UTC ( [id://1180972]=note: print w/replies, xml ) Need Help??


in reply to Re: Addition of hashes
in thread Addition of hashes

To expand a bit:

The value of a hashref depends on the context - and not only scalar vs list, but it's different between numeric and string context, e.g.

perl -e 'print {}' # string-context HASH(0x114dcb8) perl -e 'print 0 + {}' # numeric context 18996408 perl -e '{} + 0' # does not compile syntax error at -e line 1, near "} +"

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (6)
As of 2024-04-19 10:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found