Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Whats happening to my hash ref.

by Aragorn (Curate)
on Jun 01, 2004 at 11:22 UTC ( #357997=note: print w/replies, xml ) Need Help??


in reply to Whats happening to my hash ref.

You get what you ask for, i.e. the array reference, which you have to dereference properly to get the elements of the array:
foreach $key (keys(%$vars)){ print "$key\n"; foreach $array_elem ({@$vars->{$key}}) { print "\t$array_elem\n"; } # You can also use something like this to get at the array # elements individually: # print $vars->{$key}->[0]; # first element }
Arjen

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://357997]
help
Chatterbox?
[Lady_Aleena]: LanX, for every module I've written?
[huck]: Lady_Aleena see Re: pl script in webserver and/or Re: pl script in webserver for what they use
[Lady_Aleena]: Wouldn't I have to run the modules somehow to get their %INC?
[huck]: the first one works just fine from the command line but requires editing
[huck]: but neither will handle autoloads

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (5)
As of 2017-05-27 00:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?