should be:

# imprime html.
print <<WEB_page;

Content-type: text/html


<!doctype html public "-//w3c//dtd html 3.2 final//en">
<html>

YOU should use the CGI module.. (makes life very easy!)


-----Original Message-----
From: Eduardo Cancino [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 24, 2002 9:25 AM
To: [EMAIL PROTECTED]
Subject: What's wrong with this?


Hi everybody!

The next script runs looks pefectly in IE but in Netscape it shows the
source of the html...

#!c:/perl/bin/perl.exe

# recibe la forma.
read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});
@pairs = split(/&/, $buffer);

# inicia variables.
$to = "info\@domain.mx";
$from = "info\@domain.mx";
$subject = "Comentarios Sitio Web";

# manda el mail.
open (MAIL,"|mail $to");
print MAIL <<"END_top";

"To: $to
Reply-To: $to:
Subject: $subject"

END_top

foreach $pair (@pairs)
{
   ($name, $value) = split(/=/, $pair);
    $value =~ tr/+/ /;
    $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
    $form{$name} = $value;

   if ($form{$name} ne "" && $form{$name} ne "no" && $name ne 'enviar') {
      print MAIL $name . " = ". $form{$name} . "\n";
  }
}

close MAIL;

# imprime html.
print <<WEB_page;

Content-type: text/html
<!doctype html public "-//w3c//dtd html 3.2 final//en">
<html>
<head>
<title>Ciceana - Gracias</title>
</head>
<body bgcolor='ffffff'>
<center>
<h1><font class='covitur'>Domain</font></h1>
</center>
<br>
<center>
<font>Has sido registrado</font>
</center>
<br>
<center>
<font>Gracias!</font>
</center>
<br>
<center>
<font face='Verdana' fgcolor='00006' size='2'><a
href='../index.html'>regresar<a>
<enter>
</body>
</html>

WEB_page
exit;


Thanks, Lalo.


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

----------------------------------------------------------------------------
--------------------
The views and opinions expressed in this email message are the sender's
own, and do not necessarily represent the views and opinions of Summit
Systems Inc.


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to