From owner-freebsd-questions Thu Oct 18 17:52:25 2001 Delivered-To: freebsd-questions@freebsd.org Received: from gaia.host4u.net (gaia.host4u.net [209.150.128.48]) by hub.freebsd.org (Postfix) with ESMTP id 3E47B37B409 for ; Thu, 18 Oct 2001 17:52:23 -0700 (PDT) Received: from andre ([216.71.43.117]) by gaia.host4u.net (8.8.5/8.8.5) with SMTP id TAA25330 for ; Thu, 18 Oct 2001 19:52:05 -0500 Message-ID: <077d01c15838$2a6af4f0$a50410ac@olmct.net> Reply-To: "Andre` Niel Cameron" From: "Andre` Niel Cameron" To: "free bsd" Subject: Perl Help Please Date: Thu, 18 Oct 2001 20:51:19 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2462.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2462.0000 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Hi, This is driving me NUTS ok here is my scripts: #!/bin/perl print "Content-type: text/html\n\n"; @COMMAND= ("Login", "Fight"); &Display_Html("templates/login.html"); $check= $ENV{QUERY_STRING}; if ($check == $COMMAND[0]) { &Display_Html("templates/test.html"); } sub Display_Html { $data_file = $_[0]; open(HTML, $data_file) || die("Could not open file!"); @Html_template=; close(HTML); print "@Html_template"; @Html_template= (); } Two things, One the IF statement is always true! And two it loads the test.html INTO the login.html so its one web page the page doesn't change! I only started Perl yesterday so I'm sure I did domething stupid anyone care to point it out? Regards, Andre` C. Technical Support ԿԬ ---------------------------------------------------------------------------- - Visit our support manual at http://supportmanual.com/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message