#!/usr/bin/perl use strict; use warnings; use HTML::TokeParser::Simple; my $html = do { local $/; ; }; my $p = HTML::TokeParser::Simple->new(\$html); my ($table, $start); while (my $t = $p->get_token){ $start++ if $t->is_start_tag('tr'); next unless $start; last if $t->is_start_tag('br'); $table .= $t->as_is; } print "*$table*\n"; __DATA__ stuff
Header
1 2 3 4
Trailing Info #### ---------- Capture Output ---------- > "C:\Perl\bin\perl.exe" _new.pl * 1 2 3 4 * > Terminated with exit code 0.