... $sid = "aus Formulardaten empfangen"; ... $my $html; { local $/ = undef; open FILE, "< $htmlfilename" or die $!; $html = ; close FILE; } $html =~ s/%sid%/$sid/g; print $html; ...