Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight

Re: Mistakenly Believing split is using @_

by lemming (Priest)
on Sep 19, 2001 at 22:22 UTC ( #113432=note: print w/ replies, xml ) Need Help??

in reply to Mistakenly Believing split is using @_

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.

Comment on Re: Mistakenly Believing split is using @_

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://113432]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (5)
As of 2015-11-27 17:50 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (731 votes), past polls