Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^2: STDIN ..???

by skx (Parson)
on Jan 03, 2010 at 03:17 UTC ( #815373=note: print w/replies, xml ) Need Help??


in reply to Re: STDIN ..???
in thread STDIN ..???

Yes this is the solution. The following is a simple demonstration that should be useful to the OP:

#!/usr/bin/perl use strict; use warnings; use CGI; # print a simple content-type which will ensure we're not at # risk of XSS attacks, etc. print "Content-type: text/plain\n\n"; # get the CGI object my $cgi = new CGI; # for each parameter submitted foreach my $param ( $cgi->param() ) { # print the parameter and the value it contained. print $param . " " . $cgi->param( $param ) . "\n"; }
Steve
--

Replies are listed 'Best First'.
Re^3: STDIN ..???
by Your Mother (Chancellor) on Jan 03, 2010 at 04:15 UTC
    # print a simple content-type which will ensure we're not at # risk of XSS attacks, etc. print "Content-type: text/plain\n\n";

    Just throwing this out there. IE does not respect content type headers over some of its other content heuristics and some servers write their own headers no matter what the CGI sends. So that might not be safe in edge cases. :(

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://815373]
help
Chatterbox?
[marto]: good morning all
[Corion]: Hi marto!
[Corion]: I hope all is well marto! ;) My godson had a surprise visit to the hospital yesterday because he fell and had cut his skin besides his eye, but everything was glued together again and all is well
[marto]: good grief, that's not fun, glad to hear all is as well as could be :)

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (8)
As of 2016-12-08 09:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (137 votes). Check out past polls.