Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
mod_perl snafu
use CGI qw/:standard/ ;
use strict;
# demonstration how mod_perl may screw up your naive CGI code... Call
# this script passing different name parameter several times.
my $name = param('name') || "professor";
sub say_hi {
my $real_name = shift;
print "Hi there, $name";
if ($name ne $real_name) {
print "... or should I call you $real_name?\n";
} else {
print "!\n";
print header('text/plain');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.