sub mywrite { my $candidate = shift; print "$candidate->{firstname} $candidate->{surname}:$candidate->{id}\n"; }