use Exception::Class ( 'MyException' => { description => '' } ); eval { MyException->throw( message => '' ); }; if ($@) { print "I see you, exception class (boolean)!\n"; } else { print "Nothing to see here (boolean).\n"; } if ( $@ ne '' ) { print "I see you, exception class (ne '')!\n"; } else { print "Nothing to see here (ne '').\n"; } __END__ I see you, exception class (boolean)! Nothing to see here (ne ''). #### use overload # an exception is always true bool => sub { 1 }, '""' => 'as_string', fallback => 1;