Am Freitag, 7. April 2006 22:36 schrieb [EMAIL PROTECTED]:
> I was trying to limit the result to the words /Health and Safety
> Classes/ that appear on the page. How do I get there?
At first you need to understand regex! :)
> open PAGE, 'c://redcross.htm';
> while( my $line = <PAGE> ) {
> $line =~ /Health and Safety Classes/
> print "$1\n";
> }
$1 has no value because you did not use groups.
The esiest - based on you code - is:
while( <PAGE> ) {
print if /Health and Safety Classes/;
}
Look after:
perldoc perlopentut
perldoc perlretut
perldoc perlre
perldoc LWP
cu,
Oliver
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>