Im trying to add a variable string to a string I'm using to index a hash. How can I do this? Any Ideas, I'd be grateful, cheers!!
Perl keeps telling my variable isn't initialised..
$hash{'colourred'} = 'RED'; $hash{'colourblue'} = 'BLUE'; $t='colour'; print $hash{"$t.red"} print $hash{"$t.blue"}
In reply to Concatenating strings to use in a hash.. by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |