Using eval to evaluate an expression
$x = 1; $y = 0; eval {$result = $x / $y}; print "eval says: $@" if $@;