#!/usr/bin/perl use warnings; use strict; use HTML::TokeParser::Simple; my @array = ; for my $line (@array){ my $tp = HTML::TokeParser::Simple->new(\$line); my $cell_data; while (my $t = $tp->get_token){ $cell_data++, next if $t->is_start_tag('td') and $t->get_attr('height') == 40 and $t->get_attr('width') == 40 and $t->get_attr('border') == 0; print $t->as_is if $cell_data and $t->is_text; } } __DATA__ cell data 1 cell data 2 cell data 3 cell data 4 cell data 5 cell data 6 cell data 7 cell data 8 #### ---------- Capture Output ---------- > "C:\Perl\bin\perl.exe" _new.pl cell data 4 cell data 5 cell data 6 cell data 7 cell data 8 > Terminated with exit code 0.