Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: using split

by imrags (Monk)
on Jul 23, 2009 at 04:52 UTC ( #782560=note: print w/replies, xml ) Need Help??


in reply to using split

Try this:
Update: Added 2 lines more and modified the var names as per svenXY!
$abc = 'i am going to split line1; and then line2; and then line3; and + assign to variables'; my ($no1,$no2,$no3) = (split/\;/,$abc); print "$no1\n","$no2\n","$no3\n"; my ($d,$e) = (split /\;/,$abc)[0,2]; # or anything [1,2] print $d,"\n",$e;
Raghu

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://782560]
help
Chatterbox?
[Corion]: Meh... For bringing Perl into the Enterprise, I need to learn more about GSSAPI :-(

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (8)
As of 2018-06-21 13:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?



    Results (118 votes). Check out past polls.

    Notices?