Offer Kaye <mailto:[EMAIL PROTECTED]> wrote:
: while (defined(my $token = $parser->get_tag("font"))) { : my $data = $parser->get_text; #get the data : $data =~ s/^\s+//; #get rid of extra whitespace the : $data =~ s/\s+$//; # the beginning and end : push @all_data,$data; # save the data : } I am a big fan of HTML::Tokeparser. You can avoid the regular expressions above by using the get_trimmed_text() method. while ( defined( my $token = $parser->get_tag('font') ) ) { push @all_data, $parser->get_trimmed_text(); } Technically, we don't need $token, but it is often useful to have it on hand. while ( $parser->get_tag('font') ) { push @all_data, $parser->get_trimmed_text(); } HTH, Charles K. Clarkson -- Mobile Homes Specialist 254 968-8328 -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>