$name = replace($cfg{NAME}, {NAME => "jochen"}); print "hallo $name\n"; sub replace {   my ($data, $fill) = @_;   $data =~ s{%%(.*?)%%}{exists($fill->{$1}) ? $fill->{$1} : ""}gse;   return $txt; }