[Chicago-talk] specifying 2 variables as 1 hash key
Steven Lembark
lembark at wrkhors.com
Wed Dec 3 17:59:19 CST 2003
-- Paul Baker <pbaker at where2getit.com>
>
> On Dec 3, 2003, at 1:36 PM, Dooley, Michael wrote:
>
>> print "$hash{$var1$var2}"; #this does not work.
>
> That's because you want this:
>
> print $hash{"$var1$var2"};
the camel has a good description of hash keys. You
probably just want a composite key:
$key1,$key2
(i.e., separated with a comma, as on a list). These
is already handling for this built into the language
from before referents (necessary for nested hashes).
--
Steven Lembark 2930 W. Palmer
Workhorse Computing Chicago, IL 60647
+1 888 359 3508
More information about the Chicago-talk
mailing list