in reply to Can't call method "abs" on an undefined value.
Anyway, your immediate problem is that you don't include reduce in the 'use List::Util' import list. But after fixing that, your next problem is that $a and $b start off as objects, but after the first reduce, $a is now a simple number rather than an object, so $a->abs fails.
Dave.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Can't call method "abs" on an undefined value.
by HollyKing (Pilgrim) on May 05, 2006 at 23:26 UTC | |
by ikegami (Patriarch) on May 05, 2006 at 23:30 UTC | |
by HollyKing (Pilgrim) on May 05, 2006 at 23:49 UTC | |
|
Re^2: Can't call method "abs" on an undefined value.
by HollyKing (Pilgrim) on May 05, 2006 at 23:48 UTC | |
|
Re^2: Can't call method "abs" on an undefined value.
by ikegami (Patriarch) on May 05, 2006 at 23:25 UTC | |
by dave_the_m (Monsignor) on May 05, 2006 at 23:38 UTC | |
by HollyKing (Pilgrim) on May 05, 2006 at 23:53 UTC |