Read two lines at a time and concatenate them. Use /s on the regex to allow '.' to match the newline.
#! perl -slw use strict; m[red line.*location (\S+) (\S+)\n]s and print "($1, $2)" while $_ = <DATA> . <DATA>; __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
In reply to Re: Extracting Data from a second line
by BrowserUk
in thread Extracting Data from a second line
by RCP
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |