It is a simple solution but it would be even simpler if you avoided the un-necessary chomp and assignment to $line, and used an unless statement modifier. I don't know if it is safe to assume that every record begins with an "@" symbol.
while ( <DATA> ) { print unless m{^\@}; }
I hope this is of interest.
Cheers,
JohnGG
In reply to Re^2: Getting Lines 2,3, and 4 from FASTQ file's Chunk
by johngg
in thread Getting Lines 2,3, and 4 from FASTQ file's Chunk
by neversaint
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |