Flip it around.
if ( /^(foo|bar)/ ) { my $useful_code; } else { die "What the heck?!\n"; } [download]
In reply to Re: Regex Or Die! by ChrisCantrall in thread Regex Or Die! by pileofrogs