sub has_captured_matches { return $#+ }; [download]
In reply to Re^2: Determing whether a regexp has capturing matches by adrianh in thread Determing whether a regexp has capturing matches by adrianh