Marcus Claesson wrote: > > lt, gt etc. are used for string comparisons. Change 'lt' to < and 'gt' to > > > and your code should work. > > > > You're right, but this script was a simplification of a bigger one where > '>' didn't work (my mistake to not spot the difference...). Here is a > more 'real' situation: > > Input file: > 4635a 1e-180 BL0976 > 4635a 0 BL0978 > 4635a 1e-10 BL1343 > 4635a 8e-86 BL1774 > 4635a 6e-18 Blon1206 > 4635a 1e-123 BL1165 > 4635a 5 BL0978 > 4635a 50 BL0978 > > Script: > > while (<>) { > @row = (split /\t/); > ($contig,$E_value,$locus_tag) = (@row); > if ($E_value < 1e-50) { > print "$E_value\t SMALL\n"; > } elsif (($E_value > 1e-50) && $E_value < 5) { > print "$E_value\t BIGGER\n"; > } elsif ($_ > 5) {
I think you meant elsif ($E_value > 5) { You might also want to add a >= or <= somewhere to process 5 or 1e-50 > > print "$E_value\t BIGGEST\n"; > } > } > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]