Entering edit mode
8.9 years ago
top1214
▴
20
So I'm trying to pull some stuff from a fastq file using perl.
#!/usr/bin/perl -w
use strict;
use warnings;
my $open = $pairfile.$j.".fq";
open (FILE, "<$open") or die "\nCouldn't open file $open $!";
while($line = <FILE> && $a<$q){
print $line;
}
Produces an infinite number of '1's. That's it just '1'. What am I doing horribly wrong?
Doing
more FCC5V4BANXX-WHZEBkvtDAAADTAAPEI-100_L7_1.fq
produces the expected
@HISEQ:351:C5V4BANXX:7:1101:1204:2054 1:N:0
NCTGGTAAAGAAACTCGCACACACACACACACACGCACGCACGCACACGCTTACCGAAAACTGTAAGTTTATGAATATTTTTTACACTGTGGCCAATATTTTAGGGAAGTCAGCATCACTAAATG
+
#==ABGGGGGGGGGGGGGGGGGGGGGGGGGDGGGGGGGGGCGEE>GGGGGGGGGGGGGGGGGGFEBFFGGGGF=BFCFGGGGG@FFGGCFGGFFGGG.CEGGGEGG?:DG6BCG5@B=>CG=EBG
Oh wow. Never mind. The logical test was reporting as true (1), and that was being assigned to $line.
This code will not compile!
Indeed it won't. OP, please provide the real code you used in the future because that will get you a better answer and save people time.