summaryrefslogtreecommitdiffstats
path: root/debian/perl-framework/t/htdocs/modules/cgi/perl_echo.pl.PL
blob: b7591a65a19f3990a9410f344fde9c4680e6950f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#echo some data back to the client

print "Content-type: text/plain\n\n";

if (my $ct = $ENV{CONTENT_LENGTH}) {
    read STDIN, my $buffer, $ct;
    print $buffer;
}
elsif (my $qs = $ENV{QUERY_STRING}) {
    print $qs;
}
else {
    print "nada";
}