>>881
0で割ったら0にならないものを、無理やり0にしようとしてるんだから
素直に場合わけした方がいいよ。
if ($fuga == 0) {
$hogehoge = 0;
} else {
$hogehoge = $hoge / $fuga;
}
eval使うと遅いし。
$ perl
use Benchmark;
timethese(1_000_000,
{'ore'=>sub{if ($fuga == 0) {$hogehoge = 0;} else {$hogehoge = $hoge / $fuga;}},
'omae'=>sub{$hogehoge = eval { $hoge / $fuga };}});

Benchmark: timing 1000000 iterations of omae, ore...
omae: 6 wallclock secs ( 6.64 usr + 0.00 sys = 6.64 CPU) @ 150625.09/s (n=1000000)
ore: 0 wallclock secs ( 0.39 usr + 0.00 sys = 0.39 CPU) @ 2557544.76/s (n=1000000)
(warning: too few iterations for a reliable count)