in reply to Can you spot the problem?
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Can you spot the problem?
by BrowserUk (Patriarch) on Mar 09, 2004 at 13:17 UTC | |
by Abigail-II (Bishop) on Mar 09, 2004 at 13:24 UTC |