use strict; use Data::Dumper; my %hash; %hash = map {map { chomp; $_ => '1' } split /(\s+|\W+)/} ; print Dumper(\%hash); __DATA__ LOW-RES PDF NOT PRINT-READY MY BIG TOE BOOK 1: A WAKENING Section 1 Delusion or Knowledge: Is This Guy Nuts, or What? Section 2 Mysticism Demystified The Foundations of Reality LOW-RES PDF NOT PRINT-READY The My Big TOE reality model will help you understand your life, your purpose,