All pastes #716394 Raw Edit

Anonymous

public text v1 · immutable
#716394 ·published 2007-09-26 19:47 UTC
rendered paste body
use strict;
use warnings;
use WWW::Mechanize;
use HTML::TableExtract;

my $mech = WWW::Mechanize->new( autocheck => 1 );
$mech->agent_alias( 'Windows IE 6' );
$mech->quiet(0);
my $url = 'http://www.wsz.pl/upload/files/o51_o51.html';

open(CSV, '>s.csv') or die "Can't open 's.csv' for update: $!";

    $mech->get( $url );
        if ( $mech->success ) {

                my $te=HTML::TableExtract->new(keep_html=>0, br_translate=>0 );
                $te->parse($mech->content());

                foreach my $col ($te->columns) { print join("\t", @$col), "\n"; }

        }


close(CSV);