 There's more than one way to do things  Comment on   Exceptions
should be "exceptional". That is, you shouldn't expect them to
happen during normal functioning of the program. So lets see
what the overhead of providing (unused) exception handling is:
use strict; use warnings; use Benchmark 'cmpthese'; cmpthese(-1,
{ 'eval' => \&eval_code, 'noeval' => \&no_eval_code, }); sub
eval_code { my $x = 0; for (reverse 0..9) { eval {
some_more_code ($_); }; if ($@) { error_sub(); } } } sub
no_eval_code { for (reverse 0..9) { if ($_==0) { error_sub(); }
else { some_more_code ($_); } } } sub some_more_code { } sub
error_sub { }   Rate eval noeval eval 185563/s -- -7% noeval
198639/s 7% --  In words: the processing cost of an unexercised
eval is essentially nothing.  DWIM is Perl's answer to Gödel  In
reply to Re^2: Nested evals - are they evil? (sample benchmarks)
by GrandFather  and:  <code> code here </code>    • Please read
these before you post! —             For:     Use:     & &amp;
< &lt;     > &gt;     [ &#