C
Cognition Peon
I am getting desried output for the following piece, but -w switch to perl
is reporting that 'if />.*/' in the code uses uninitialized value. The
input file follows. I also tried another combination of if statement, but
the error still persists. 'if /^(>.*)/' accessing the match from $1.
while(<FILE>) {
my ($header, ) = ();
next if /^$/;
chomp;
if (/>.*/) { # Use of uninitialized value here
$header = $&;
$bin = (split('[_-]', $header))[1];
push @{$bins{$bin}}, $header;
} else {
$fasta{$header} = $_;
}
}
close(FILE);
is reporting that 'if />.*/' in the code uses uninitialized value. The
input file follows. I also tried another combination of if statement, but
the error still persists. 'if /^(>.*)/' accessing the match from $1.
while(<FILE>) {
my ($header, ) = ();
next if /^$/;
chomp;
if (/>.*/) { # Use of uninitialized value here
$header = $&;
$bin = (split('[_-]', $header))[1];
push @{$bins{$bin}}, $header;
} else {
$fasta{$header} = $_;
}
}
close(FILE);
ACCCTCTTTGTCCTATTTTTCTTTCTTCCAGACCAAAAGTACCGAGTTCAACAACACCGTCTCTTGTAGCAATCGGGTGAGTAGAGAGTTCAGTGCTGCTGGCTTTCTCCAGGGAGACGCCAGGCATTTTGGAGAGGGAGTATCCTGCTA[C/T]GTGCAGAACTCCGAGAGGTGCCTGGGCTCCGGGACGCCGCCGCCGGGGGAAAGGGGACATCTGGGCTGTCAGAGCGGGGCTGCGCCTAGCTTGGGACAACACTTCTGTTCCAATTTAGGGAGAGGAAGTCTCTATCCGGAGGAAAGGCAAuTSLPxov-bin3-005614 TAATTTAGAAAAAATCATGGCCCCACATTTTGTCAAGGATTCTTACAAGTGATATTCAAATATCTAATCTAAAATGATTATCTAGAAATTGGCACATTCTAAGTGTGCAGATGCTGATGAGGAGCAGGTATTGATAGACAGCGCGTTATG[C/T]GTCAAAGGATGTCTATCCTTTGCTAAAGTGTTACTCTGACTATGCTGTAAAAAGCAGGAGGTAAGAGCTTAAGAAAGAGGAGTAAAAGAGATAATTCTCATGAGATAAACTCTAAGGATTGATGCTGTGCTCCAGGTCTCTCCAGTGTTT
AAAGAGCCCGTAGGCGTTTAGGTGTTATATAGTGCAGCCAGAAAGCTCTGGAGCATCAGGGAGACTCCAACTTAAGGCAACAGCATGGGTGAATAAGGGCTTCCTGTGGACTGGCAATGAGAGGCAAAACCTGGTGCTTGAGCACTGGCC[C/T]CTAAGGCAGGCCTTACAGATCTCTTACACTCGTGGTGGGAAGAGTTTAGTGTGAAACTGGGGTGGAATTGGGTGTCCACGTATGTTCCCTTTTGCCTTACTATATGTTCTGTCAGTTTCTTTCAGGAAAATCTTCATCTTACAACTTGTAuTSLPxov-bin4-005119
uTSLPxov-bin4-006317