my ($x,$y,$redline); while (<FILE>) { if ($redline) { ($x,$y) = /at location (\S+) (\S+)/; print "$x $y\n"; } $redline = /red line/; }
Vary the details as needed. $redline is set to a true value when ever the pattern matches (and a false value when it doesn't match) so that on the next iteration of the loop, you'll be able to capture the location information.
In reply to Re: Extracting Data from a second line
by duff
in thread Extracting Data from a second line
by RCP
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |