$band1 and $band2 two are declared as (with $band1 on the left and $band2 on the right)
s12 t12
s21 s11
t12 s12
t15 t23
t23 t15
After the first print statement I get
s 12 t 12
s 21 s 11
t 12 s 12
t 15 t 23
t 23 t 15
But it seems as if my second if statement is never executed(as in should it the second time through. It looks correct to me though I don't know why it's not executing, it should print hello the second time, third time and fourth time through. Really it should print hello any time band and two are both t's and band 1's number is higher than band 2's or band 1 and 2 are both s's and band 2's number is higher than band 1's, or if the band on the left is a t and the band on the right is a s.
my @splitB1 = split(//, "$band1");
my @splitB2 = split(//, "$band2");
my $band1Num = join("","$splitB1[1]","$splitB1[2]");
my $band2Num = join("","$splitB2[1]","$splitB2[2]");
print $splitB1[0], "\t", $band1Num, "\t", $splitB2[0], "\t", $band2Num, "\n";
if (($band1Num < $band2Num and $splitB1[0]=="s" and $splitB2[0]=="s"){
print "Hello World"
}
Thank-you
Aucun commentaire:
Enregistrer un commentaire