Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Treating sub output as a hash

by JavaFan (Canon)
on Jan 26, 2012 at 22:33 UTC ( #950234=note: print w/replies, xml ) Need Help??


in reply to Treating sub output as a hash

Is there a way to avoid defining %t, and make the code more compact?
print keys %{{a}};
a() returns a list. The inner {} make a hashref, and the outer %{} dereferences this hashref.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://950234]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (3)
As of 2017-06-28 20:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How many monitors do you use while coding?















    Results (646 votes). Check out past polls.