perl -E '$x="a0b"; $x=~/0/; say $&; if ($&) { die "not reached!" } if ($x=~/0/) { say "matched zero" }'