my $package = $input{somepackage}; # Foo was passed to input print $$package::a;