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