![]() |
Interpolation
I was learning hashes and one part has really confused me. I think that i may have misunderstood the concept of interpolation.
I wanted to print a value in the hash table so i used the code: :
print "$family_name{$given_name}\n";what I would expect however is the code to be as followed: :
print "$family_name{“$given_name”}\n";As i am referencing the value of the variable “given_name” rather then the variable itself; thus i would expect the double quote marks so that the variable is interpolated ( and the value of the variable is used in the expression ). I hope that this makes sense. I will be happy to clarify any points that are unclear. |
Re: Interpolation
what exactly were you trying to accomplish with the question marks.
|
| All times are GMT -5. The time now is 10:53 AM. |
Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC