#!usr/bin/perl use warnings; use strict; my $line = "25 / 0"; eval ( $line ); print "There is an error:\n" if $@; print $@;