sub new { my $class = shift; my $id = shift; my $self = { _ID => $id, _FINALIZED => 0, _EXPENSES => [], _TOTAL => undef, _COUNT => undef, }; return bless $self, $class; } #### $newexp->{_ID} = $#expenses + 1; #### $newexp->{_ID} = scalar @expenses; #### local $Data::Dumper::Indent = 3; #### # open file my $file = do {local $/; }; #### $self->{$hiddenkey} = shift if @_;