programming-examples/perl/SystemFunction/Using eval to evaluate an expression.pl
2019-11-15 12:59:38 +01:00

4 lines
73 B
Perl

$x = 1;
$y = 0;
eval {$result = $x / $y};
print "eval says: $@" if $@;