in reply to variable name

PadWalker's varname can do exactly that. If it's for display purposes, Data::Dumper::Simple might do. What are you trying to do?