use strict; use warnings; use Data::Dumper; my %hash; open(FILEHANDLE, ") { # print $_; %hash = split(" ", ); } print Dumper(\%hash); __END__ Odd number of elements in hash assignment at .., line 2. $VAR1 = {};