- or download this
while (<>) {
my($ssn, $obj) = parse_account($_);
push @{$accounts{$ssn}}, $obj;
}
- or download this
while (my($ssn, $acctlist) = each %accounts) {
foreach my $acct (@$acctlist) {
print $ssn, $acct->email, "\n";
}
}
- or download this
sub email {
my $self = shift;
return $self->{'email'};
}