bob_dobalina has asked for the wisdom of the Perl Monks concerning the following question:
package MyObject; my @a = (); sub new { my $class = shift; my $self = {}; bless $self, $class; return $self; } sub A { my $self = shift; return \@a; } sub fillIt { my $self = shift; my %hash = (); my $i = 0; for($i=0; $i<10; $i++) { $hash{"key_$i"} = $i; } push(@a, \%hash); } sub cleanUp { my $self = shift; #?????????????????????????????????????????????????? # best way to deref entire @a? #?????????????????????????????????????????????????? } return 1;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Dereferencing question
by ikegami (Patriarch) on Sep 01, 2009 at 23:54 UTC | |
|
Re: Dereferencing question
by stevieb (Canon) on Sep 01, 2009 at 23:32 UTC | |
by bob_dobalina (Sexton) on Sep 02, 2009 at 14:18 UTC |