my $foo    = (); my $bar    = \$foo; my $string = 'hello <--REPLACE-->'; # das klappt natürlich nicht $string =~ s/<--REPLACE-->/$bar/; $foo = 'world'; print $string, "\n"; $foo = 'community'; print $string, "\n";