$ perl -e '$s = join("", (("") x 160_000)); $re = qr/^(?:)+$/; print "ok\n" if $s =~ /$re/;' ok