in reply to Empty list as a return value

Undefined and an empty list both have a length of -1, so for what you need to use it for <bold>THEY ARE THE SAME THING</bold>. If you want you can return (""), but then you will have a single element array that contains nothing.
  • Comment on (c-era)Re: Empty list as a return value

Replies are listed 'Best First'.
RE: (c-era)Re: Empty list as a return value
by merlyn (Sage) on Oct 23, 2000 at 19:53 UTC
    Well, they both have a length of 0. Perhaps you are confusing the length with what $#ARRAYTHINGY returns, which is one less than the length, but therefore suitable for use with upper index bounds.

    -- Randal L. Schwartz, Perl hacker