eval { $number = sqrt(-1) }; if ($@) { print "negative sqrt"; }