my @data; while () { chomp; next if /EOS$/; s/"\s?"/\t/g; s/"//g; push @data, [ split /\t/, $_ ]; } foreach (@data) { my %hash; @hash{qw(First Last Addr City State Phone)} = @$_; print "$hash{First}, $hash{Last}\n"; print "$hash{Addr}\n"; print "$hash{City},$hash{State}\n"; print "$hash{Phone}\n"; print "\n"; }