use Data::Dumper; $var{ 'a', 1, 'b', 2 } = 1; # ^ this statement builds a simple hash table, %var print Dumper(\%var); #### $VAR1 = { 'a1b2' => 1 };