#!/usr/bin/perl use strict; use warnings; use HTML::TokeParser::Simple; my $p = HTML::TokeParser::Simple->new(*DATA); my $html; while (my $t = $p->get_token){ next if $t->is_start_tag('a') or $t->is_end_tag('a'); $html .= $t->as_is; } print "$html\n"; __DATA__

some text

This is a url :O

some more text