use Carp; ... my %tables; @tables{ qw/foo bar/ } = (); sub ... { ... croak 'Disallowed table' unless exists $tables{$table); ... } #### 2;0 juerd@ouranos:~$ perl -e'undef christmas' Segmentation fault 2;139 juerd@ouranos:~$