[Israel.pm] find line in page

Ernst, Yehuda yernst at ndsisrael.com
Mon Jul 19 05:20:10 PDT 2004


it is still with while loop

do i have a way to do it with regular expr.?

-----Original Message-----
From: perl-bounces at perl.org.il [mailto:perl-bounces at perl.org.il]On Behalf Of Itzik Lerner - Orpak
Sent: Monday, July 19, 2004 4:08 PM
To: 'Perl in Israel'
Subject: RE: [Israel.pm] find line in page


Try:
	my $i;
	$i++ while <@{\$page->as_string}>;

--Itzik Lerner

-----Original Message-----
From: Ernst, Yehuda [mailto:yernst at ndsisrael.com] 
Sent: Sunday, July 18, 2004 2:39 PM
To: perl at perl.org.il
Subject: [Israel.pm] find line in page


I tried the starter list no success so i am trying here

hello!

I have a html page and i would like to find a line number inside that
contains a unique word

i know how to find the line i took the page and put it into array

$page = get(http://)
@lines = $page->as_string;

now i want to look for a word in the page but i need the line number as the
output.

i did it with while loop and    @lines[$i] =~ /word/ 

is there a fast way to do it?

thanks 

Yehuda .

****************************************************************************
*******
Information contained in this email message is intended only for use of the
individual or entity named above. If the reader of this message is not the
intended recipient, or the employee or agent responsible to deliver it to
the intended recipient, you are hereby notified that any dissemination,
distribution or copying of this communication is strictly prohibited. If you
have received this communication in error, please immediately notify the
postmaster at nds.com and destroy the original message.
****************************************************************************
*******

_______________________________________________
Perl mailing list
Perl at perl.org.il
http://perl.org.il/mailman/listinfo/perl
_______________________________________________
Perl mailing list
Perl at perl.org.il
http://perl.org.il/mailman/listinfo/perl
***********************************************************************************
Information contained in this email message is intended only for use of the individual or entity named above. If the reader of this message is not the intended recipient, or the employee or agent responsible to deliver it to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please immediately notify the postmaster at nds.com and destroy the original message.
***********************************************************************************




More information about the Perl mailing list