if($_ =~ /Sbjct:\s*(\d+)\D+(\d+)*$/ .. /\n\n\n\AQuery\=/)
You are using the flip-flop operator so I will assume that there is a single line in $_. If so then /\n\n\n\AQuery\=/ will never match because each line only has one newline and it is at the end of the line. Also there appear to be only two newlines before the string 'Query=' and the anchor \A can only match at the beginning of a string so there can't be anything in front of it.
You probably want something like this (UNTESTED):
my $subject; while ( <> ) { $subject = $_ if /^Sbjct:\s*\d+\D+\d+$/; print $subject if /^Query=/; }
In reply to Re: Parsing a file
by jwkrahn
in thread Parsing a file
by cowboyrocks
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |