Created
November 14, 2017 17:57
-
-
Save megawertz/c7c4d6d1b777ba5884ed1e009b7c1c25 to your computer and use it in GitHub Desktop.
Echo form submitted data back to web browser for in-class demonstration purposes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
use URI::Query; | |
use Data::Dumper; | |
print "Content-Type: text/html\n\n"; | |
print "You sent the server:\n\n"; | |
print "<br><hr><br><pre>"; | |
print $ENV{'QUERY_STRING'}; | |
print "</pre>"; | |
print "<br><hr><br><pre>"; | |
my $q = URI::Query->new( $ENV{'QUERY_STRING'} ); | |
my %hash = $q->hash; | |
print Dumper( \%hash ); | |
print "</pre>"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment