in reply to Find a specific word in a text file
Try to be more specific and detailed about what you need. "move forward or backward to grab another word nearby analysing character by character" could mean a lot of things, and the implementation will change depending on what it is that actually means.
However, lets assume that you've got the entire webpage in $page:
if ( ( my $position = index $page, "word" ) >= 0 ) { print "Found at $position.\n"; }
Once you've told us what you mean by that second part to the question we can help you to figure out how to "go forward or backward". ...it may be that the whole thing belongs in a regexp anyway.
Dave
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Find a specific word in a text file
by algonquin (Sexton) on Sep 09, 2004 at 08:02 UTC | |
by davido (Cardinal) on Sep 09, 2004 at 08:13 UTC | |
by algonquin (Sexton) on Sep 11, 2004 at 10:59 UTC | |
|
Re^2: Find a specific word in a text file
by algonquin (Sexton) on Sep 09, 2004 at 08:39 UTC | |
by wfsp (Abbot) on Sep 09, 2004 at 09:34 UTC | |
by algonquin (Sexton) on Sep 11, 2004 at 11:01 UTC | |
by davido (Cardinal) on Sep 09, 2004 at 15:21 UTC | |
by Anonymous Monk on Sep 09, 2004 at 14:36 UTC |