in reply to Re^3: Getting data from a file (Operons and Genes).
in thread Getting data from a file (Operons and Genes).

I think you have tabs separating the fields instead of 4 spaces that the code somebody wrote is expecting, and unexpected carriage return characters at the end of lines. Changing it to
my @fields = split(' ', $_);
(or just my @fields = split;, since ' ' and $_ are what split defaults to) solves both problems.