Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: split split

by suaveant (Parson)
on Jun 23, 2009 at 16:17 UTC ( #774091=note: print w/replies, xml ) Need Help??


in reply to split split

Split is usually used for breaking up a string, for pulling a specific piece of a string out usually a regexp is a better bet

if($string = /^client\s+(\d+\.\d+\.\d+\.\d+)/) { $ipaddr = $1; } else { die 'horribly'; }

                - Ant
                - Some of my best work - (1 2 3)

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (4)
As of 2022-09-30 05:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I prefer my indexes to start at:




    Results (125 votes). Check out past polls.

    Notices?