in reply to Re: my $scope as the default for variables
in thread Please help me print this hash.

This is kinda a dangerous thing to do, unless you completely trust the author of the files you're processing. (And you should probably not completely trust the author. Even if you're the author.) Otherwise they could slip in something like...

Hello @{[ qx!rm -fr ~/Documents! ]} World

... and cause your eval to delete important documents.

Better would be to stuff the variables that you want them to be able to access into a hash called %vars and process it like this:

%vars = ( hostname => 'my.example.com', sitename => 'My Example', ); #... while(<SOURCE>) { s/\$\{(\w+?)\}/$vars{$1}/e; $text .= $_; }
perl -E'sub Monkey::do{say$_,for@_,do{($monkey=[caller(0)]->[3])=~s{::}{ }and$monkey}}"Monkey say"->Monkey::do'