in reply to Simple guestbook problem.

Use a sentinel value, such as '*' on a line by itself, to mark the end of each entry. Read perlvar for information on the $/ variable, which you can change from its default "\n" or "\r\n" to your sentinel value (say, "$/*$/"). If you do that, your use of the diamond operator in list context will still read all the results and place them into an array.

Be sure to sanitize your content in some way to prevent cross-site-scripting vulnerabilities and abuse of your sentinel value; a combination of simple regexes and the CPAN HTML::Sanitizer should do the trick.

Finally, it's somewhat misleading to name your file "Guestbook.cgi." The extension .cgi represents an executable CGI script, not a text file. Consider .txt or .dat.