in reply to filtering data and while loop problem
last unless $line =~ m/^\d/;
in your get_values subroutine, it keeps reading all the lines and stops when it finds a line which is not starting with a digit. This line isvariableStep chrom=chr2
in your __DATA__ section. Now when the code flow go back towhile ( defined(my $line= <DATA> ) and !@values )
in foreach loop, the $line gets the line9837 0.090
which, I think, is not what you are expecting.
|
|---|