use match::simple; foobar() if $needle |M| $haystack;