$ perl -e 'use strict; use warnings; my $c = 1/0; print "we get there\n";' Illegal division by zero at -e line 1. $ #### $ perl -e 'use strict; use warnings; eval {my $c = 1/0;}; print "we get there but got the following problem:\n $@ \n";' we get there but got the following problem: Illegal division by zero at -e line 1. $