in reply to Finding a line after a keyword

mitso874:

Generally, you would simply read lines until you find the 'trigger' (MILLISEC, in your case), then count off the lines until you get the data you want. If the MILLISEC line was three lines before the end of the header, for example, you'd do something like:

# Wait for 'MILLISEC' to appear while (<F>) { last if /MILLISEC/; } # your current code.... my $findline=3; # with this adjusted to the right value...

Note: It would be nice if you'd update your post and add code tags around your code to make it easier to read. <c>Your code goes between these</c>.

...roboticus

When your only tool is a hammer, all problems look like your thumb.