http://www.perlmonks.org?node_id=580588


in reply to printing array ref of hash refs

well, what do you mean by "I have an array refs" ? how do you contain them ?

the following foreach block example extracts State value for a single ref :

my $ref = [ { 'State' => 'Maine', 'Town' => 'Portland' }, { 'State' => 'New Hampshire', 'Town' => 'Concord' } ]; foreach ( @{$ref} ) { print $_->{State}."\n"; }
so to use it on all your refs, you'll need to run this foreach loop on each one of your refs.

HTH.

Enjoy,
Mickey

Replies are listed 'Best First'.
Re^2: printing array ref of hash refs
by Anonymous Monk on Oct 25, 2006 at 15:03 UTC
    Mickey, that did the trick...Thanks!