in reply to Two element array, shifted twice, is true?

DB<13> x @_ 0 undef

This shows that the array contains 1 element, and that element happens to be undefined. So @a in scalar context returns 1, which is true.

Presumably get_object() is being called with 3 arguments.

Dave.

Replies are listed 'Best First'.
Re^2: Two element array, shifted twice, is true?
by SwaJime (Scribe) on Aug 16, 2016 at 18:41 UTC
    Yes, I had forgotten that since it is a class method, the class object is passed in as the first parameter. So the two explicit parameters are actually the second and third elements of @_. My third element was undef, which is a problem elsewhere in my code.