while (my $record = ) { chomp $record; my @person = split /\t/, $record; # now do something interesting with @person } #### my @cols = qw(name email office); while (my $record = ) { chomp $record; my %person; @person{@cols} = split /\t/, $record; # now do something interesting with %person } #### open (EMPLOYEES, 'employees.txt') or die "Can't open employees.txt: $!\n";