Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Hi Monk
I have received a message by using the code.The print function shows as followssub recvMessage { $MySocket->recv ($text,1000);#For Recv print $text; }
Now what i need is as followsINVITE tel:+1-212-555-2222 SIP/2.0 Via: SIP/2.0/UDP [5555::aaa:bbb:ccc:ddd]:1357;comp=sigcomp;branch=z9hG +4bKnashds7 Max-Forwards: 70 ............ ............
The "SIP/2.0/UDP [5555::aaa:bbb:ccc:ddd]:1357;comp=sigcomp;branch=z9hG4bKnashds7" part in a variable $via.(i.e. line started with Via:)
The part "70" in a variable $max_forwards (i.e line started with Max-Forwards:). and so on.Plz suggest me a suitable code.
Regd's
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How to extract the different parts of a string stored in a varible?
by Corion (Patriarch) on Jul 07, 2008 at 10:48 UTC | |
|
Re: How to extract the different parts of a string stored in a varible?
by apl (Monsignor) on Jul 07, 2008 at 10:53 UTC | |
|
Re: How to extract the different parts of a string stored in a varible?
by Viki@Stag (Sexton) on Jul 07, 2008 at 11:07 UTC | |
by Viki@Stag (Sexton) on Jul 07, 2008 at 11:18 UTC |