in reply to Re^2: check for wantarray?
in thread check for wantarray?

[ Please don't use <pre>. All you have to do is put <p> in front of every paragraph. ]

I don't think CountZero meant to imply that it's possible by running the program, only that it can be impossible without running the program. Such is the nature of dynamic languages such as Perl.

How can I distinguish both if the the array has only one element, a reference of an array?

By reading the docs. There's no way to know programatically.