$aa = 4; $bb = 0; eval { $cc = $aa/$bb; }; if ( $@ ) { print "Wrong = Divide by Zero\n"; } else { print "No Exception = Continue your code here\n"; } #### eval { $cc = 4/0; }; if ( $@ ) { print "Wrong = Divide by Zero\n"; } else { print "No Exception = Continue your code here\n"; }