Using CGI in a script written in Perl

#!perl -w
use Mail::Sender ;
use CGI qw/:standard/ ;
my $q = new CGI ;
 $q->import_names('Q');

$Msg = <<MYHEREDOC;
<tr> <td align=right>City:</td> <td align=left><b>$Q::city</b></td></tr>
MYHEREDOC

each one of    print $Msg;   print TFILE $Msg;  $sender->Send( $Msg );    
outputs  City:  New York

whereas when using PerlScript with Active State

$Msg = <<MYHEREDOC;
<tr> <td align=right>City:</td> <td align=left><b><%
$Response->write($Request->Form('city')) ; %></b></td></tr>
MYHEREDOC

the corresponding outputs are   Win32::OLE=HASH(0x2e854a8)->writeblock(34);

using $Msg=<<'MYHEREDOC' ;  results in the output value being
$Response->writeblock(34); 

What must I do to have print TFILE $Msg; and $sender->Send( $Msg ); produce
New York as output?

Or, what is the technique for capturing the contents of a page being sent to
a browser
and storing the contents to a file?

Jim Doyle
_______________________________________________
Perl-Win32-Web mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-web

Reply via email to