pushing errors to another sub
[email protected] (Robert Hicks)
| Newsgroups | perl.beginners |
|---|---|
| Message-ID | <[email protected]> |
just "bad" pseudo code:
sub one {
$process->name(\$html) || $errors_from_one( $process->error() );
$process->name(\$text) || $errors_from_one( $process->error() );
}
sub errors_from_one {
my $error = @_;
push (my @errors, $error);
# do stuff to make sure the errors are uniq
return my @uniq_error_list;
}
I want to be able to get at those errors later. Will something like that
work?
Robert