#! /usr/bin/perl use warnings; use strict; use feature qw{ say }; use Syntax::Construct qw{ // }; use open ':std', OUT => ':utf8'; use WWW::Mechanize::GZip; use HTML::TableExtract; my $site = 'http://www.fourmilab.ch/yoursky/cities.html'; my $mech = 'WWW::Mechanize::GZip'->new; $mech->get($site); $mech->follow_link( text => 'Portland OR' ); my $te = 'HTML::TableExtract'->new; $te->parse($mech->content); my $table = ($te->tables)[3]; for my $row ($table->rows) { say join "\t", map $_ // q(), @$row; }