[Israel.pm] parse text

Peter Gordon peter at pg-consultants.com
Mon Aug 20 00:16:28 PDT 2007


On Mon, 2007-08-20 at 10:00 +0300, Ernst, Yehuda wrote:
> Hello!
> 
> I am trying to parse this txt
> 
> script> <!--
> name = '195.175.37.71';
> port1 = 9899;
> port2 = 9363;
> port3 = 2539;
> port4 = 7222;
> port5 = 1768;
> port6 = 524;
> port7 = 3876;
> port8 = 5011;
> port9 = 7319;
> port10 = 5091;
> GOEQRP = port6 + (627933-785) / 83;
> document.write(name + ':' + GOEQRP);
> // --></script>
> 
> 
> But when i write
> 
>  ($prx) = $response->content =~ m|script (.*?)script|;
> 
1. There is no space after script
2. . will not match \n unless the /s switch is added

Try this:  
($prx) = $response->content =~ m|script(.*?)script|s;

> 
> i get nothing(empty)
> also it i use @prx
> 
> any ides?
> 
> 
> Yehuda Ernst                        יהודה ארנסט
> NDS Technologies Israel Ltd. mailto:yernst at nds.com>
> Jerusalem          Tel:  +972 (2) 589-4427
> PO Box 23012    Fax: +972 (2) 589-4825
> Israel.    91235    Cell  +972 54 5664427
> 
> *********************************************************************************************************
> This e-mail is confidential, the property of NDS Ltd and intended for the addressee only.  Any dissemination, copying or distribution of this message or any attachments by anyone other than the intended recipient is strictly prohibited.  If you have received this message in error, please immediately notify the postmaster at nds.com and destroy the original message.  Messages sent to and from NDS may be monitored.  NDS cannot guarantee any message delivery method is secure or error-free.  Information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses.  We do not accept responsibility for any errors or omissions in this message and/or attachment that arise as a result of transmission.  You should carry out your own virus checks before opening any attachment.  Any views or opinions presented are solely those of the author and do not necessarily represent those of NDS.
> 
> NDS Limited Registered office: One Heathrow Boulevard, 286 Bath Road, West Drayton, Middlesex, UB7 0DQ, United Kingdom. A company registered in England and Wales  Registered no. 3080780   VAT no. GB 603 8808 40-00
> 
> To protect the environment please do not print this e-mail unless necessary.
> **********************************************************************************************************
> 
> _______________________________________________
> Perl mailing list
> Perl at perl.org.il
> http://perl.org.il/mailman/listinfo/perl




More information about the Perl mailing list