#!/usr/bin/perl # Ouvrir le fichier $i=0; if (open (FICHIER, ") { push(@Lignes,$_); $max++; } # flock (FICHIER, 8); # déverrouille close (FICHIER); # Sortie vers le navigateur : print "Content-type: text/html\n\n"; print < Visitor's Book

 

Here are the messages we have received

 

html_fin for ($i=0; $i<$max; $i+=6) { $time = @Lignes[$i+0]; $PNom = @Lignes[$i+1]; $NomFam = @Lignes[$i+2]; $email = @Lignes[$i+3]; $subject = @Lignes[$i+4]; $body = @Lignes[$i+5]; print "", $PNom, " ", $NomFam, " (", $email, ")

\n"; print "wrote on ", $time, " on the subject ", $subject, ":

\n"; print "", $body, "
\n"; } print <"If you would like, you can also write a message in our Visitor's Book, or go back to the Homepage.

 

Have fun!

 

html_fin } else # erreur fichier { print < Erreur Impossible to read the Visitor's Book

Please go back to the Homepage.

Have fun! html_fin } exit;