Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Re: Re: another way to split with limit

by guillaume (Pilgrim)
on Aug 20, 2001 at 00:34 UTC ( #106079=note: print w/replies, xml ) Need Help??


in reply to Re: Re: another way to split with limit
in thread another way to split with limit

Ok so I guess your print statement here isn't related to your question and that you only want to match both side of `:'
You could do so like that:
($a, $b) = /(\w+):(\w+)/;
The regex at the right remembers the matches due to the parenthesis, and $a get the first value and $b the second.
Guillaume

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (3)
As of 2022-05-16 22:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you prefer to work remotely?



    Results (64 votes). Check out past polls.

    Notices?