#The $. is the current line number in file push @{ $data{$.}{nums} }, $1; and push @{ $data{$.}{words} }, $1;