Hey all,

I have some code (below) that will strip data from a HTML page and go
ahead and display information that I need.  The proble I am facing is
that the data has 4 possible out comes derived from user input.  

Basically I would like to start on 2 possible out comes.  If the user is
to have the page return 2 headers named number and coverage I can
display the results of both outcomes.  I.e 1: The user can get DSL 2:
The user can't get DSL. 

Now, if the user can't get DSL then the page will return only 2 headers
(number and coverage) while if the user can get DSL the page will return
3 headers (number coverage and location).  For some reason I can't get
my code to display both results.  I have tried if and or statements but
that still won't work.

$html_string = $tree->as_HTML;

  @headers = qw/number coverage/; # Tried this but doesn't work or
@headers = qw/number coverage location/ ;
  $te = new HTML::TableExtract( headers => [@headers] );
  $te->parse($html_string);
  # Examine all matching tables
  foreach $ts ($te->table_states) {
    #print "Table (", join(',', $ts->coords), "):\n";
    foreach $row ($ts->rows) {
     $mRow = "@$row";
     $mRow =~ s/.*\>//g;
     #$mRow =~ s/[^.\d\s]//g;
     my @webValues = split/\s+/, $mRow;
     print join(' ', $mRow), "\n";
     }
  }
  undef @headers;

Does any one have any ideas?

Kind regards,

Dan

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to