in reply to Re: Regex Or Die!
in thread Regex Or Die!

I downvoted this, it's a common but poor way of programming. You should deal with the errors up front, as close as possible to the test, then let your 'normal' case proceed:
if ( ! /^(foo|bar)/ ) { die "What the heck?!\n"; } my $useful_code; ...