From perldoc perlfunc:
In scalar context, returns the number of fields found
and splits into the "@_" array. Use of split in scalar
context is deprecated, however, because it clobbers your
subroutine arguments.
It's preventing you from possibly shooting yourself in the foot.
For a better method, use the function length() to count the number of characters in a string.
In reply to Re: Mistakenly Believing split is using @_
by lemming
in thread Mistakenly Believing split is using @_
by enoch
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |