Your second match (next unless ...) clobbers the previous $2.
$ perl -le '$_="foobar";/(foo)(bar)/;print "\$2 $2";/oo/;print "\$2 $2 +";' $2 bar $2
Save $2 off (my( $re, $s ) = ( $1, $2 );) and then use $severity = $s instead.
In reply to Re: obvious matching patterns don't match
by Fletch
in thread obvious matching patterns don't match
by Random_Walk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |