basicdez has asked for the wisdom of the Perl Monks concerning the following question:

I have somewhat of a dilemma here. If I read in the following file... named basicdez.dat
"Jane""Doe" "123 W Beverly Ave" "Talahasee""Maine" "222-22-2222" "EOS"
with the following perl logic...
#!/usr/bin/perl use strict; my $i; my $data; open(DATA," basicdez.dat") || die "Cannot open datfile: $!\n"; while(<DATA>){ chomp; unless ($_=~ /"EOS"/){ $data .= "$_"; } elsif ($i ne 1) { $data .="\n"; } if ($_=~ /"EOS"/){ $i=1; } } close(DATA); my @data=split(/\n/, $data); for(@data){ my($first_name,$last_name,$address,$city,$state,$phone)=split; print "$first_name,$last_name\n"; print "$address\n"; print "$city, $state\n"; print "$phone \n"; } exit;
What I would expect would be something as follows...
Jane, Doe 123 W Beverly Ave Talahasee,Maine 222-22-2222
However, what I am getting is the following...
"Jane""Doe","123 W Beverly, Ave" "Talahasee""Maine"
Please help me out on this one as I am most entirely confused. I thank you in advance for any assistance on this issue and apologize for my ignorance in what should be a simple matter. peace dez L