Hi all
 
I am try to get my first guestbook to work.
I have got it writing to a file, and retrieving,..but only the first
entry in the logfile.
 
I have delimited the fields in the logfile by ","..and delimited the
last field for each entry with a "*".
 
How do I get it to move to the next entry after the *, and print that to
screen?
 
Any help greatly appreciated.
 
Code as follows.
 
Mark Smith
 
 
 
open(READFILE, $log_file) ||
 
print "The log file could not be opened",$BR;
 
while(<READFILE>)
 
{ @data = split( /\n/);
 
foreach $entry (@data)
 
{ ($d, $e, $f, $g, $h, $i, $j)= split(/,/, $entry);
 
print "First Name : ", $d, $BR;
print "Last Name : ", $e, $BR;
print "City : ", $f, $BR;
print "State : ", $g, $BR;
print "Country : ", $h, $BR;
print "Email : ", $i, $BR;
print "Comments : ", $j, $BR;
}
}
close(READFILE);


Reply via email to