my (%first, %last); while (<DATA>) { next unless /^(Query|Sbjct):\s+(\d+)\s+(?:.*)\s(\d+)\s*$/; $last{$1}= $3; next if exists $first{$1}; $first{$1}=$2; } print<<RESULT; $first{'Query'} $first{'Sbjct'} $last{'Query'} $last{'Sbjct'} RESULT
In reply to Re: Regex perplexity
by Skeeve
in thread Regex perplexity
by eweaverp
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |