Perl Monk, Perl Meditation | |
PerlMonks |
1 loop too many in array iterationby jms53 (Monk) |
on Feb 13, 2013 at 08:17 UTC ( [id://1018500]=perlquestion: print w/replies, xml ) | Need Help?? |
jms53 has asked for the wisdom of the Perl Monks concerning the following question:
Hello Monks, Having followed your advice, my simple object is now working. However, I don't understand why the code works as it is. I have an object, with the following structure:I then have a method that pushes an array-ref to @{$ref->{history}}:
My problem comes to when I want to see the contents of $self->{history}, I have to use 3 loops, when it's only a 2-dimensional array.
If anyone could explain to me why the need for 3 loops (or show me where my de-referencing went awfully wrong), it would be greatly appreciated.
J -
Back to
Seekers of Perl Wisdom
|
|