use strict; my %hash; $hash{the_var_i_want} = "this is the actual value I want to get"; my $the_name = ; #say, this would be "the_var\n" chomp $the_name; print $hash{"${the_name}_i_want"};