Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

scalar variable 1

Status
Not open for further replies.

calabama

Programmer
Feb 19, 2001
180
US
How do I print the actual name of a scalar variable and not the contents?
 
Is this what you mean? You just need to escape the $ at the front of the scalar.

Code:
# This will print the name of the scalar '$s' and its value:

print "\$s = $s\n";
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top