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

That's not it either. If so, you'd get a different error message:
>perl -e "$obj = 4; $obj->test()" Can't call method "test" without a package or object reference at -e l +ine 1.

Replies are listed 'Best First'.
Re^3: Can't call method "abs" on an undefined value.
by dave_the_m (Monsignor) on May 05, 2006 at 23:38 UTC
    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.

      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.