Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^3: does split(".") work?

by ysth (Canon)
on Nov 16, 2009 at 05:45 UTC ( #807371=note: print w/ replies, xml ) Need Help??


in reply to Re^2: does split(".") work?
in thread does split(".") work?

Not sure what you mean about list assignment; the difference is that a third parameter of -1 makes split keep trailing empty strings where by default it discards them. In your example, split returns 13 empty strings (one from before the first character of $ip, one for each position between characters, and one from after the last character.)

--
A math joke: r = | |csc(θ)|+|sec(θ)|-||csc(θ)|-|sec(θ)|| |
Online Fortune Cookie Search
Office Space merchandise


Comment on Re^3: does split(".") work?

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (21)
As of 2015-07-30 20:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (273 votes), past polls