Ok this is what I came up with....it "looks" right to me. I do a Print " The ID is $rp1 and the Sequence is $invseq\n"; and the ID prints but the sequence has no value. I guess I messed up in the hash? Not really sure what I am doing wrong now.
if ($flag21 == 1) {
foreach $num(@number) {
if (($num) eq ($rp1)) {
$invseq = $seqi{$rp1};
$invseq = $invseq + 1;
$seqi{$rp1} .= $invseq;
} else {
$seqi{$rp1} .= 1;
$invseq = $seqi{$rp1};
push @number, $rp1;
}
}
}
I changed the first part to a 3 step add thinking I messed up somewhere there it was originally this (and didn't work)
if ($flag21 == 1) {
foreach $num(@number) {
if (($num) eq ($rp1)) {
$seqi{$rp1} += 1;
$invseq = $seqi{$rp1};
} else {
snipped the rest off as it was the same
|