in reply to Re: Having trouble loading a hash with map
in thread Having trouble loading a hash with map

This should do what you want:

my %hash = map /(\w+)/ ? ( $1, 1 ) : (), <>;

Maybe it should, but it doesn't: only maps first word from each line.