>The point:
>I need to take this text file and format each entry (separated by hard
>returns) so that the user info (name address, etc) are all in their own
>columns still and then for each number they chose (up to 271 out of 271) it
>creates a new entry with their contact info and one number in the last
>column.
Here's some untested pseudo code to help you:
# for each line of the DAT file:
while (<FILE>) {
# split each line on the pipe, and throw into matching
# variable entries - note that bingo numbers are all
# thrown into a single array.
my ($date, $time, $name, $street, $city, $state,
$town, $zip, $country, $email, $phone, @subscriptions) =
split (/|/, $_);
# now, loop through the subscriptions array and
# create a new line for each bingo number.
foreach my $subscription (@subscriptions) {
$new_data .= "$name|$street|$city|$state|$country|
$zip|$phone|$email|$subscription|\n";
}
}
Once the entire DAT file has been looped through, you'll have your
completed data in $new_data to do whatever you want. NOTE that this is
untested code. Don't sue me if I birth your child.
Morbus Iff
.sig on other machine.
http://www.disobey.com/
http://www.gamegrene.com/