in reply to Re^3: More intelligent warning?
in thread More intelligent warning?

You're assuming split was written to easily count the number of tokens.

Um. Nope. I made no such assumption. Thats purely your assumption.

I agree part way. I can see the thought train that leads to some of it. I've written this function that splits strings. It can be called in 3 contexts. What is the logical thing to do in those contexts?

  1. List context: return the list of bits.
  2. Scalar context: Return how many bits.
  3. Void context: He's asked us to split, but wants nothing back. I guess we could stick the bits in @_ and let him access them there.

But, I fail to see a good (nor even a bad) use case for returning the count AND sticking the bits in @_.

Maybe there's one, but I just don't see it. If it stuck them in @F per -a, maybe.


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
"I'd rather go naked than blow up my ass"