use FindBin qw ($Bin); my $test='hello'; my $ref2Test=\$test; my $source="$Bin/directories.txt"; open DIRECTORIES, "<",$source; while() { # chomp; print "this is \$_: $_\n"; print "An that is my string:\n"; print "initial $$ref2Test middle '$_' final "; print "\n----------------------\n\n"; } close DIRECTORIES;