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.
In reply to Re: Concatenating strings to use in a hash..
by Anonymous Monk
in thread Concatenating strings to use in a hash..
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |