live Returns the result of the given expression if no exception is thrown. If an exception is thrown an object is returned that evaluates to false when used in any standard boolean test or comparison operation ("<", "<=", ">", ">=", "==", "!=", "lt", "le", "gt", "ge", "eq" and "ne"). This can be used to simplify testing for exceptions. For example: foreach my $n (3,2,1,0) { is live{$n/$n}, 1, "$n/$n == 1"; }; will produce ok 1 - 3/3 == 1 ok 2 - 2/2 == 1 ok 3 - 1/1 == 1 not ok 4 - 0/0 == 1 # Failed test (test.pl at line 37) # got: 'DIED: Illegal division by zero at test.pl line 37.' # expected: '1' NOTE: that it is an object not a false value that is returned when an exception occurred. # this will pass even if foo dies ok(refaddr live {$o->foo}, 'foo returns object'; # this will pass even if foo dies unlike live {$o->foo}, '/fribble/', 'no fribble'; Appropriate care must be taken.