Note: forwarded message attached.



Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!
--- Begin Message ---
Hi. This is the qmail-send program at onion.perl.org.
I'm afraid I wasn't able to deliver your message to the following addresses.
This is a permanent error; I've given up. Sorry it didn't work out.

<[EMAIL PROTECTED]>:
ezmlm-reject: fatal: Sorry, I don't accept message with empty Subject (#5.7.0)

--- Below this line is a copy of the message.

Return-Path: <[EMAIL PROTECTED]>
Received: (qmail 15664 invoked by uid 76); 2 Oct 2002 12:39:52 -0000
Received: from web13003.mail.yahoo.com (HELO web13003.mail.yahoo.com) (216.136.174.13) 
by onion.perl.org (qpsmtpd/0.11-dev) with SMTP; 2002-10-02 12:39:52Z
Message-ID: <[EMAIL PROTECTED]>
Received: from [80.247.147.25] by web13003.mail.yahoo.com via HTTP; Wed, 02 Oct 2002 
05:39:51 PDT
Date: Wed, 2 Oct 2002 05:39:51 -0700 (PDT)
From: Yahaya Mohammed <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="0-1054349745-1033562391=:15960"
X-SMTPD: qpsmtpd/0.11-dev, http://develooper.com/code/qpsmtpd/

--0-1054349745-1033562391=:15960
Content-Type: text/plain; charset=us-ascii


Hi,

Iam a novice in programming CGI with perl, Iam curently learning on how to send form 
fields to a cgi script for processing and return the processed fields to a client 
browser. I used many codes example I found internet but failed to work by giving me 
blank screen. Here is the code I used

my(%frmFlds);

getFormData(\%frmFlds);

sub getFormData {
    my($hashRef) = shift;
    my($buffer) = "";

    if ($ENV{'REQUEST_METHOD'} eq 'GET') {
        $buffer = $ENV{'QUERY_STRING'};
    }
    else {
        read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});
    }

    foreach (split(/&/, $buffer)) {
        my($key, $value) = split(/=/, $_);
        $key   = decodeURL($key);
        $value = decodeURL($value);
        %{$hashRef}->{$key} = $value;
    }
}

foreach (sort (keys (%hashRef))) {

          print "$_:     $hashRef{$_}<br>\n";

}

 

sub decodeURL {
    $_ = shift;
    tr/+/ /;
    s/%(..)/pack('c', hex($1))/eg;
    return($_);
}

Please assist.



---------------------------------
Do you Yahoo!?
Yahoo! News - Today's headlines
--0-1054349745-1033562391=:15960
Content-Type: text/html; charset=us-ascii

<P>Hi,</P>
<P>Iam a novice in programming CGI with perl, Iam curently learning on how to send 
form fields to a cgi script for processing and return the processed fields to a client 
browser. I used many codes example I found internet but failed to work by giving me 
blank screen. Here is the code I used</P>
<P>my(%frmFlds);<BR><BR>getFormData(\%frmFlds);<BR><BR>sub getFormData 
{<BR>&nbsp;&nbsp;&nbsp; my($hashRef) = shift;<BR>&nbsp;&nbsp;&nbsp; my($buffer) = 
"";<BR><BR>&nbsp;&nbsp;&nbsp; if ($ENV{'REQUEST_METHOD'} eq 'GET') 
{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $buffer = 
$ENV{'QUERY_STRING'};<BR>&nbsp;&nbsp;&nbsp; }<BR>&nbsp;&nbsp;&nbsp; else 
{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; read(STDIN, $buffer, 
$ENV{'CONTENT_LENGTH'});<BR>&nbsp;&nbsp;&nbsp; }<BR><BR>&nbsp;&nbsp;&nbsp; foreach 
(split(/&amp;/, $buffer)) {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; my($key, 
$value) = split(/=/, $_);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
$key&nbsp;&nbsp; = decodeURL($key);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
$value = decodeURL($value);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
%{$hashRef}-&gt;{$key} = $value;<BR>&nbsp;&nbsp;&nbsp; }<BR>}<BR><BR>foreach (sort 
(keys (%hashRef))) {</P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; print 
"$_:&nbsp;&nbsp;&nbsp;&nbsp; $hashRef{$_}&lt;br&gt;\n";</P>
<P>}</P>
<P>&nbsp;</P>
<P>sub decodeURL {<BR>&nbsp;&nbsp;&nbsp; $_ = shift;<BR>&nbsp;&nbsp;&nbsp; tr/+/ 
/;<BR>&nbsp;&nbsp;&nbsp; s/%(..)/pack('c', hex($1))/eg;<BR>&nbsp;&nbsp;&nbsp; 
return($_);<BR>}</P>
<P>Please assist.</TT></P><p><br><hr size=1>Do you Yahoo!?<br>
<b><a href="http://news.yahoo.com/";>Yahoo! News</a></b> - Today's headlines
--0-1054349745-1033562391=:15960--
--- End Message ---
-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to