Your script has many errors in it, it looks like you copy/pasted several things together. Please run your script before posting so we can concentrate on the problem part.
That being said, the following works:
use strict;
use LWP::Simple;
use HTML::TableExtract;
my $page = get("http://www.dhl-usa.com/TransitTimes/USTTimeRslts.asp?n
+av=TransitTimes&oz=53213&oc=1&oh=ORD&dz=60056&dc=1&dt=1/9/2006&tt=1&h
+y=&zn=2&am=Y");
my $te = HTML::TableExtract->new( depth => 3, count => 3);
$te->parse($page);
foreach my $ts ($te->table_states) {
foreach my $row ($ts->rows) {
print join(',', @$row), "\n";
}
}
__OUTPUT__
Service,Arrival Date and Time,Days in Transit*
DHL Next Day 10:30 am
(Letter ű 150 Pounds),Tuesday,áJaná10,á2006 áBy 10:30 A.M.,1
DHL Next Day 12:00 pm
(Letter ű 150 Pounds),Tuesday,áJaná10,á2006 áBy Noon,1
DHL Next Day 3:00 pm
(Letter ű 150 Pounds),Tuesday,áJaná10,á2006 áBy 3:00 P.M.,1
DHL 2nd Day Service
(Letter ű 150 Pounds),Wednesday,áJaná11,á2006 áBy 5:00 P.M.,2
DHL Ground Service
(Letter ű 150 Pounds),Tuesday,áJaná10,á2006 áBy end of day,1
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.