$t = 1; ${ "type" . $t } = "Hello world!\n"; print $type1; print ${$main::{type1}} __OUTPUT__ Hello world! Hello world! #### $t = 1; $hash{"type" . $t } = "Hello world!\n"; print $hash{type1}; print ${$main::{hash}}{type1}; __OUTPUT__ Hello world! Hello world! #### my $t = 1; my %hash; $hash{"type" . $t } = "Hello world!\n"; print $hash{type1}; print ${$main::{hash}}{type1}; __OUTPUT__ Hello world!