# public to add accounts to the creditaccounts sub addCreditAccount { my $closure = shift; my $account = shift; my $accountsref = &{$closure}( "CREDITACCOUNTS" ); push @{ $accountsref }, $account; }