note
DamnDirtyApe
<p>Put the "try" code inside an <code>eval</code> block, then check the value of <code>$@</code>. Example:</p>
<code>
#! /usr/bin/perl -w
use strict;
for my $i ( 2, 1, 0 ) {
for my $j ( 2, 1 ) {
eval {
print "$j / $i = " . $j / $i . $/;
};
if ( $@ ) {
warn "Warning: $@";
}
}
}
__END__
</code>
<!-- Node text goes above. Div tags should contain sig only -->
<div class="pmsig"><div class="pmsig-102902">
<BR/>_______________<BR/>
[DamnDirtyApe]
<blockquote>
<pre>Those who know that they are profound strive for clarity. Those who
would like to seem profound to the crowd strive for obscurity.
--Friedrich Nietzsche</pre>
</blockquote>
</div></div>
386991
386991