Kristofer Wolff wrote:

> hi folks,
> 
> i write a tiny webserver in perl, and have a problem with the Query_String.
> in the server i set up this:
> 
>               if ($r->method eq 'GET')
>               {
>                       my $get = print $r->url();


$get will have the return from print in it (undef or 1 I believe), not
the URL.  Something like this may be more to your needs:

                        my $get = $r->url();
                        print $get;

If you aren't using strict at the start, you're probably making a mistake. :)


>                       ($url, $ENV{QUERY_STRING}) = split(/\?/, $get);
>               }
> 
> to get the string behind the '?' as the Query. than i open a .pl given by
> the url:
> 
>                               if($INTERPRETER{$inter})
>                               {
>                                       $out = `$INTERPRETER{$inter} $file`;
>                                       $c->send_response("$out");
>                               }
> 
> it runs fine ! BUT:
> if I run a env.pl like
> $serversystem = $^O;
> print "SERVERSYSTEM = $serversystem";
> print "<hr>";
> print "env:<hr>";
> @key = keys %ENV;
> print "<table>";
> foreach (@key)
> {
>       print "<tr><td>$_ </td><td>$ENV{$_}</td></tr>";
> }
> print "</table>";
> print "<hr>";
> exit;
> 
> there is no query at all !
> 
> My problem is, i have a website with many forms ( Get AND post ) how can i
> use it in my perl server ?



-- 
   ,-/-  __      _  _         $Bill Luebkert   ICQ=14439852
  (_/   /  )    // //       DBE Collectibles   Mailto:[EMAIL PROTECTED]
   / ) /--<  o // //      http://dbecoll.tripod.com/ (Free site for Perl)
-/-' /___/_<_</_</_     Castle of Medieval Myth & Magic http://www.todbe.com/

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

Reply via email to