That died with a 'division by zero' error. Can you spot why?my $avg = 0; if (my ($x, $y) = $str =~ m!(\d+)/(\d+)!) { $avg = $x / $y if $y; }
Abigail
In reply to Re: Can you spot the problem?
by Abigail-II
in thread Can you spot the problem?
by dws
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |