in reply to splitting results

You didn't specify what the content was (it should be a table, right?) and how to get to the expected result from it. So, I imagined it.
#!/usr/bin/perl use strict; use warnings; use HTML::TableExtract; my $html = "<table><tr><th>info\n<tr><td>john\n<tr><t" . "d>100 - 2000\n<tr><td>kent</table>"; my $table = 'HTML::TableExtract'->new(); $table->parse($html); print "Content-type: text/text\n\n"; my @rows = $table->rows; chomp @$_ for @rows; my $output = join ' ', 'data:' . $rows[0][0], "$rows[1][0]:" . do { $rows[2][0] =~ /- (...)/; + $1 }, "$rows[3][0]:" . substr $rows[2][0], 6, 4; print $output;

map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]

Replies are listed 'Best First'.
A reply falls below the community's threshold of quality. You may see it by logging in.