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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.