in reply to Displaying a variable's name and value in a sub

Smile-n-Nod:

What should it print for these?

show1(7.5); show1($foo{bar}{baz}); show1(cos(.866));

Arguments aren't always variables with a name. Other than debugging and logging, I'd have a hard time coming up with a good use for knowing the variable's name. I usually just print the variable names that I use inside the subroutine in my log/debug statements.

...roboticus

When your only tool is a hammer, all problems look like your thumb.