I think it is something like:
my $wanted = $globals->{KEY};
my $output = eval $wanted;
Code:
my $globals = do("$CFG->{admin_root_path}/templates/$CFG->{build_default_tpl}/globals.txt"); my $wanted = $globals->{KEY};
my $output = eval $wanted;