Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re^3: mystery function & Odd number of elements in anonymous hash

by Corion (Patriarch)
on Jul 17, 2011 at 19:31 UTC ( [id://915002]=note: print w/replies, xml ) Need Help??


in reply to Re^2: mystery function & Odd number of elements in anonymous hash
in thread mystery function & Odd number of elements in anonymous hash

The fat comma is just that, a fat comma. It stringifies the argument on its lefthand side if it is a bareword.

Personally, I would use something like:

my $foo = func(); my $hashref = { foo => $foo, bar => $bar };

Replies are listed 'Best First'.
Re^4: mystery function & Odd number of elements in anonymous hash
by Anonymous Monk on Jul 17, 2011 at 19:49 UTC

    Thank you for your insights. I ended up writing a wrapper function to force context.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (5)
As of 2024-04-24 09:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found