> From: byron wise [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, May 02, 2000 5:30 PM
> To: Perl-Win32-Users Mailing List
> Subject: Trying to parse form

[...]

As Jack says, this sounds like an installation problem. Also,

> #!/usr/bin/perl

Is this the correct path to your perl binary? What if you run
'./scriptname.pl' at the command prompt? You said you ran perl -c,
but that's not quite as good.

> read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});
> @pairs = split(/&/,$buffer);
> foreach $pair (@pairs)  {
>         ($name, $value)=split(/=/,$pair);
>         $value=~tr/+/ /;
>         $value=~s/%([a-fA-F0-9][a-fA-F0-9])/pack("C",hex($1))/eg;
>         $value=~s/\n/ /g;
>         $value=~s/\r//g;
>         $value=~s/\cM//g;
>         $form{$name}=$value;

I used to do this -- but it's much easier to read CGI data
using the CGI module. Really, it handles all of the above for you.
Magic.

Hamish
-- 
Hamish Moffatt                   Email: [EMAIL PROTECTED]
R&D Engineer,                    Phone: +61 3 9210 5782
Advanced Networks Division       Fax:   +61 3 9210 5550
Agilent Technologies             Web:   http://www.agilent.com/

---
You are currently subscribed to perl-win32-users as: [archive@jab.org]
To unsubscribe, forward this message to
         [EMAIL PROTECTED]
For non-automated Mailing List support, send email to  
         [EMAIL PROTECTED]

Reply via email to