my $alles = join('', @lines); $alles =~ s/\/\*.+?\*\//gs; my @new_lines = split(/\n/, $alles);