Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: beginnner perl hash question

by n3toy (Friar)
on Feb 17, 2009 at 05:52 UTC ( #744299=note: print w/ replies, xml ) Need Help??


in reply to beginnner perl hash question

You can initialize your hash with:

%hash = ();

And access it later on (after it is populated) in a loop like so:

foreach $key (keys %hash) { print $hash{$key} . "\n"; }

You can also look around the Monastery. This might be some good reading for you: hashes

Jamie


Comment on Re: beginnner perl hash question
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (8)
As of 2015-07-05 05:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

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









    Results (60 votes), past polls