in reply to Concatenating strings to use in a hash..
You are looking up the hash keys "colour.red" and "colour.blue". Use one of the following instead:
print $hash{$t."red"}; print $hash{"${t}blue"};
P.S. You just posted that you figured it out - it's best to also post your solution for the benefit of others.
|
|---|