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

Re: Questions about split

by RhetTbull (Curate)
on Jul 01, 2001 at 23:26 UTC ( [id://93052]=note: print w/replies, xml ) Need Help??


in reply to Questions about split

To answer your first question, you could just do this: $field_i_want = (split /:/)[2]; That just creates a single element slice of the list returned by split. If you only wanted elements 2 and 5 you could do this: ($want1,$want2) = (split /:/)[2,5];

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (4)
As of 2024-04-25 23:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found