[plug] Perl programming using HTML::Parser

Ryan ryan at is.as.geeky.as
Mon Apr 28 15:36:09 WST 2003


On Mon, 2003-04-28 at 15:20, David Buddrige wrote:
> Hi all, 
> 
> I am attempting to learn how to use the HTML::Parser class provided by Perl. 
> To do this, I have written the following program: 
>
>       if ( "$tagname" == "html" )
>       {
> 	   print "its a html tag!\n";
>       }
>
> Can anyone see why it keeps running the line 

s/==/eq/

== is a nurmical comparison operator, you are comparing strings, so use eq

ie:	if ($tagname eq 'html') 

see also: perldoc perlop

Ryan



More information about the plug mailing list