my @filesliste = glob('./ligen/*.txt'); foreach my $filename(@filesliste) { open(FH,"<$filename") { while () { $line =~ s/(\w+)liga(.+)/

$1liga$2<\/p>/g; $line =~ s/^(\w.+)/

$1<\/td>:<\/td><\/tr>/g; } } close(FH); }