spatterson has asked for the wisdom of the Perl Monks concerning the following question:
later on in another method of class A which works, $B1 & $B2 are defined correctlymy $A = {}; bless $A, 'class A'; $A->{arrayholder} = qw//; return $A
Then class A calls a method on every class B object it containsmy $B1 = B->new(); my $B2 = B->new(); my @Bees; push @Bees, $B1, $B2;
foreach my $B ($A->{arrayholder}) { print Dumper $B; print $B->Bfoo; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How to store and retreive an array of items from within a hashref
by ikegami (Patriarch) on Jul 20, 2007 at 13:47 UTC | |
|
Re: How to store and retreive an array of items from within a hashref
by lima1 (Curate) on Jul 20, 2007 at 13:52 UTC | |
|
Re: How to store and retreive an array of items from within a hashref
by FunkyMonk (Bishop) on Jul 20, 2007 at 14:54 UTC |