in reply to Re: Parse one line of variables in multi-line tab delimited text file
in thread Parse one line of variables in multi-line tab delimited text file

Thanks, I have the web part figured out. I just would like help with the code that actually stores these values in a string.

Here's what I have so far, but it only prints out a dump of the entire text file:

print "Content-type: text/plain\n\n";

$ORDERS="../../orders.txt";

open (FILE, "<$ORDERS");
while (<FILE>) {
chomp;
($number, $Date, $name, $email) = split("\t");
print "Order: $number\n";
print "Date of Order: $Date\n";
print "Name: $name\n";
print "Email: $email\n";
print "---------\n";
}
close (FILE);
exit;
  • Comment on Re^2: Parse one line of variables in multi-line tab delimited text file