my $reader = Compress::DSRC::Archive->new; while (my $seq = $reader->next_seq) { # do something with $seq }