Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: dynamically generated array variable

by Shade (Novice)
on Jan 02, 2007 at 22:46 UTC ( #592659=note: print w/replies, xml ) Need Help??


in reply to dynamically generated array variable

The following works, with some modification to your original array:
use strict; use warnings; my @host1 =( {"a" => 1, "b" => "two" }, {"a" => 3, "b" => "four"} ); foreach my $hash (@host1) { print "a = " . ${$hash}{"a"} . ", b = " . ${$hash}{"b"} . "\n"; }

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (3)
As of 2023-06-05 21:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How often do you go to conferences?






    Results (26 votes). Check out past polls.

    Notices?