in reply to Re^3: Counting the number of items returned by split without using a named array
in thread Counting the number of items returned by split without using a named array

Well yeah, but aren't you just back to square one?

C:\test>perl -nwle"print $n = +(split)" Use of implicit split to @_ is deprecated at -e line 1. Name "main::n" used only once: possible typo at -e line 1. foo 1 foo bar 2

Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
Lingua non convalesco, consenesco et abolesco. -- Rule 1 has a caveat! -- Who broke the cabal?
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
  • Comment on Re^4: Counting the number of items returned by split without using a named array
  • Download Code

Replies are listed 'Best First'.
Re^5: Counting the number of items returned by split without using a named array
by blazar (Canon) on May 03, 2006 at 12:41 UTC

    D'Oh! I forgot to -w when I tested it. It's incredible how annoying this little thing can be!!! All in all I would regard the assignment to @_ and the connected warning as spurious, since split is not called in void context. But... they're there!