- or download this
sub add_expense { # takes Expense object as argument and adds it to _E
+XPENSES array
my $self = shift;
...
push(@expenses,$newexp);
$self->{_EXPENSES} = \@expenses;
}
- or download this
my $self = shift;
my $newexp = shift;
- or download this
my ($self, $newexp) = @_;
- or download this
my @expenses = @{$self->{_EXPENSES}};
- or download this
sub add_expense { # takes Expense object as argument and adds it to _E
+XPENSES array
my ($self, $newexp) = shift;
$self->{_EXPENSES}{$newexp} = $newexp;
}