There is more than one way to determine what constitutes a line:
use strict; use warnings; local $/ = "A red line is found\n"; while (<DATA>) { print "Red line $1" if /(at location[^\n]*\n)/; } __DATA__ A red line is found at location 2.5 4.5 A Blue line is found at location 2.6 4.5 A red line is found at location 2.67 4.56 The red arc is found at location 2.5 4.5
Prints:
Red line at location 2.5 4.5 Red line at location 2.67 4.56
In reply to Re: Extracting Data from a second line
by GrandFather
in thread Extracting Data from a second line
by RCP
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |