in reply to obvious matching patterns don't match

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.