in reply to Re^2: Argument "" isn't numeric in numeric le (<=)
in thread Argument "" isn't numeric in numeric le (<=)

That's a different question...

...the while(substr($line2, 0 , 3) ne "---") loop will certainly stop when $line2 is dashed. However, you enter the loop with $line2 set to the "Gene:" line you just processed, and at the top of the loop you read the next line. So, a dashed line is processed in the loop, and then brings the loop to a halt.

The inner loop could be recast:

while ($line2=<geneREAD>) { chomp $line2 ; if (substr($line2, 0 , 3) eq "---") { break ; } ; .... } ;
...mind you, you might want to check that the "Gene:" line is followed by something ? But that is part of the general problem of verifying the input.