Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: How to print key and value of hash in a list

by spazm (Monk)
on May 22, 2011 at 22:07 UTC ( #906207=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my %hash = ( a=>1, b=>2, c=>3);
    my @v = values %hash;  #  e.g. ( 2,   3,   1 )
    my @k = keys   %hash;  #  e.g. ('b', 'c', 'a')
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (2)
As of 2023-05-28 14:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?