sub new { my ($class, %attr) = @_; my $ref = \%attr; my @history; $ref->{history} = \@history; } #### sub trans { my @done = ["$time[5]-$time[4]-$time[3]", $type, $amount]; push @{$self->{history}}, \@done; } #### sub statement { #iterate through @{$self->{history}} in 2 dimensions my $self = shift; for my $index ( 0..$#{ $self->{history} } ) { for my $j (0..$#{$self->{history}[$index] } ) { for (0..$#{$self->{history}[$index][$j] } ) { print "$self->{history}[$index][$j][$_]\t"; } print "\n"; } } }