while(<FILE>){ next unless /^(?:A|The) (.*) is found$/; my $item = $1; my $next_line = <FILE>; next unless $next_line =~ /^at location (.*)/; my $location = $1; # needs chomp'ing?? printf "'%s' is as [%s]\n", $item, $location; # or shove into some + data structure }
In reply to Re: Extracting Data from a second line
by davidrw
in thread Extracting Data from a second line
by RCP
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |