Help for this page
my @vars = split(/\s*,\s*/,$rec);
open (DATA, "<data.txt") or die "Can't open file $!\n"; @DATA = <DATA>; ... # now insert into the hash $var_hash{$vars[2]} = 'whatever'; }