- or download this
while( my $accnt = $allAccnt->next ) {
$accnt->calcInterest() if $accnt->inCredit();
}
- or download this
sub calcInterest {
my $self = shift;
return unless $self->inCredit();
...
}
- or download this
$_->calcInterest() while $allAccnts->next;