hi

Well today i have another dude, I have a HTML file like this content:


</td></tr>
<tr><td colspan="2"><hr></td></tr>
<tr><td>
<span class="host_info">Remote host information</span><br><table
align="center" border="0" width="60%">
<tbody><tr>
<td align="left">Operating System : </td>
<td align="right">Windows 7 Enterprise</td>
</tr>
<tr>
<td align="left">NetBIOS name : </td>
<td align="right">GUSR712DPO16125</td>
</tr>
<tr><td align="left">DNS name : </td></tr>
</tbody></table>


My code is this:

#!/usr/bin/perl

#Variables
my $line="";
my $aux=0;

#REGEX

open(H,"Report.html") || die "No se puede abrir el archivo:$!";
 while($line=<H>){
        chomp($line);
        if ($line =~ /<td align\=\"left\">NetBIOS\ name\ :\ <\/td>/){
                print "Name:\t";
                print $',"\n";

        }
 }
close(H)

How do you see I try to print the next line after the REGEX match, but I
obtain the next result:

Name:
Name:
Name:
Name:
Name:

I mean, I print nothing :S

does anybody knows how could I print the next line after the regex match? I
want this output:

Name: GUSR712DPO16125

I hope some of you tell me my errors,

thanks so much

Reply via email to