my %hash(...define your hash here...); my $searchterm=<>; my $store; #or my @store if(exists($hash{$searchterm})) { $store=$hash{$searchterm}; #or you can use push(@store,$hash{$searchterm}) } #some code #to print on label just pass the $store or @store as #parameter to Label() of your GUI package.