in reply to Extracting Data from a second line

and yet another approach ...
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 }