i'm messing up somewhere along the way here...

i'm trying to get data from a table in a page which should always get
defined like this:

<table class="schiffsdetails" style="width:508px;" id="Any_20">
        <tbody>

and i'm looking for an element of the table that looks like this:

<td>Length:</td>
                                <td>266.0m</td>


i'm fine getting the url but i'm getting this four times when i try to run
the script:
Use of uninitialized value in string eq at ./vt-getlen.pl line 36, <FILE>
line 2.

and the tokeparser looks like this:
   my $parser = HTML::TokeParser::Simple->new( string => $content )
      or die "Can't define content to parser $!";

   while( my $table = $parser->get_tag( 'table' ) ) {
      next unless $table->[ 1 ]{ 'class' } eq "schiffsdetails";
      while( $parser->get_tag( "td" ) ) {
         next unless $parser->get_text( "/td" ) eq "Length";
         $parser->get_tag( "td" );
         my $length = $parser->get_text( "/td" );
         print "$data[ 0 ], $data[ 1 ], $length\n";
      }
   }

i'm calling tokeparser on line 32. any ideas?

Reply via email to