> but if they appear in the file in a different sequence then you also
> need to rewind and start looking at the beginning of the file once
> again like this:
>
> ID:
> foreach my $prime_id ( @id_hits ) {
> while ( my $line = <$AFILE> ) {
> if ( $line =~ /$prime_id/ ) {
> print "$line\n";
> seek $AFILE, 0, 0;
> next ID;
> }
> }
> }
>
Would using:
last(); # Break from while back to foreach
..instead of
next(ID);
... not produce the same result here?
Steve
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/