package Mooooo; use Modern::Perl; sub _analyse_ph { my $self = shift; my ($arg) = shift; chomp $arg; return ""; }; sub new { my $this = shift; my $class = ref($this) || $this; my $self = {}; bless $self, $class; return $self; } my $Self = Mooooo->new; my $text; while ($text = ) { $text =~ s/__([-_\.a-zA-Z]+?(?:\(.+?\))*)__/$Self->_analyse_ph($1)/gme; say $text; } 1; __DATA__ __article.reldate.dayofmonth.html_selectscalar(0,1,31,article_reldate_dayofmonth)__ __article.reldate.month.html_selectscalar(0,1,12,article_reldate_month)__ __article.reldate.year.html_inputline(6,4,article_reldate_year)__ __article.id__ __article.autor__