in reply to Re^2: Can't call method "abs" on an undefined value.
in thread Can't call method "abs" on an undefined value.

The OP gets the error message 'Can't call method "abs" on an undefined value' because reduce hasn't been imported, so isn't called, so perl just calls a block of code with $a being undef.

I was saying that *if* the OP fixed her code so that reduce was actually called, then the original error would go away, but a new error message would appear similar to the one you describe, due to a further bug in her code

Dave.

  • Comment on Re^3: Can't call method "abs" on an undefined value.

Replies are listed 'Best First'.
Re^4: Can't call method "abs" on an undefined value.
by HollyKing (Pilgrim) on May 05, 2006 at 23:53 UTC

    He did change his code and did get a different error message like you described. Thanks for the help I understand the problem now.

    Owl looked at him, and wondered whether to push him off the tree; but, feeling that he could always do it afterwards, he tried once more to find out what they were talking about.