use strict; my @interests = ( "foo", "bar", "blah"); my %hash; foreach (@interests) { $hash{$_} = "My interest is $_"; } foreach (keys %hash) { print "$hash{$_}\n"; }