use strict; use warnings; use HTML::TreeBuilder; use Data::Dumper; while ( ) { my $tree = HTML::TreeBuilder->new_from_content($_); my $body = $tree->look_down("_tag" => "body" ); my $contents = ( $body->content_list() )[0]; print "$contents\n"; } __DATA__ $userId $jobId $timeF$ampmF COMPLETED