I want to recreate the "say" function (that is, print but with a newline), but if given a list, it should print each item with a newline. If given no arguments, it should use $_. So I figure:
But now, if I happen to pass an empty array, like so...
...it will default to $_, when of course I'd like it to do nothing. The original say function apparently prints only a newline, which is not what I want, but implies that it should be possible to separate them.
So how can I distinguish between the two cases – no argument, or an empty array?