#! /usr/bin/perl use strict; use warnings; use HTML::Parser; my $string = qq~.: .:
sammler schrieb:
~; my $p = HTML::Parser->new(); $p->handler(start => \&start_handler,"tagname,self"); $p->parse($string); sub start_handler{  return if(shift ne 'script');  my $self = shift;  my $text;  $self->handler(text => sub{$text = shift;},"dtext");  $self->handler(end  => sub{print $text,"\n\n" if(shift eq 'script')},"tagname"); }