Hey All, I haven't come to you for a while with a Perl question :) Just wondering if you can give me some insight into this one...
Basically I went ahead and started to use HTML::TableExtract. I must say I am having a heap of fun with it. Unfortunatly I am just having a little bit of trouble with one area and was wondering if you can give me some thought of what you think... I have a CGI script that goes ahead and gets users data from my CGI script with this data it passes it onto another web page and checks to see if the phone number can get ADSL or not. This part is working really well. So far I can extract some of the data that I want from their page and display it to the user. The only problem is that at the moment there is 4 possbible outcomes that the page can return. The code below can extract 1 outcome perfectly (that is if the user can get ADSL) but it wont do anything for me except display a blank page if the user can't get ADSL. Any way here is the code... $html_string = $tree->as_HTML; @headers = qw/number coverage location/; $te = new HTML::TableExtract( headers => [@headers] ); $te->parse($html_string); foreach $ts ($te->table_states) { foreach $row ($ts->rows) { $mRow = "@$row"; $mRow =~ s/.*\>//g; my @webValues = split/\s+/, $mRow; print join(' ', $mRow), "\n"; } } undef @headers; ....if the user can't get ADSL the array @headers should only contain number and coverage that way results will be displayed (Don't really have to know that). So what I would essentially want to do is something like if the headers @headers don't match then try a second set of headers @headers2 = qw /number coverage/ if these headers don't match then try a 3rd lot of headers and so on.... Does this make any sense to you 'cos it's really confusing me. Cheers, Dan -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]