Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Thanks a lot,#!/usr/bin/perl use warnings; use strict; my @AoH = ({ title => 'aaa', heading => [ {item => 'bbb'}, {item => 'ccc'}, {item => 'ddd'}, ]}); $AoH[0]->{heading}->[3]->{item => 'eee'}; print $AoH[0]->{title}; print $AoH[0]->{heading}->[0]->{item}; print $AoH[0]->{heading}->[1]->{item}; print $AoH[0]->{heading}->[2]->{item}; print $AoH[0]->{heading}->[3]->{item};
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: adding an element to AoH
by prasadbabu (Prior) on Jan 05, 2006 at 14:27 UTC | |
|
Re: adding an element to AoH
by friedo (Prior) on Jan 05, 2006 at 15:02 UTC | |
|
Re: adding an element to AoH
by NetWallah (Canon) on Jan 05, 2006 at 15:12 UTC | |
by Tanktalus (Canon) on Jan 05, 2006 at 17:45 UTC | |
by jhourcle (Prior) on Jan 05, 2006 at 20:03 UTC | |
by tirwhan (Abbot) on Jan 05, 2006 at 15:23 UTC | |
by prasadbabu (Prior) on Jan 05, 2006 at 15:29 UTC |