Using <!--#exec cmd="cgi-bin/date.cgi --style=2"--> ends up being parsed, but with no output. My code snippet is:
#!/usr/bin/perl -w
use strict;
use POSIX qw(strftime);
use Getopt::Long;
## taint environmentals
delete @ENV{qw(IFS CDPATH ENV BASH_ENV)};
$ENV{'PATH'} = "/usr/local/jail";
## set up opts
my $style = "1";
GetOptions ( 'style=s' => \$style, );
## select style of date representation
my $date;
## November 26, 2001
if ($style == "1") {
$date = strftime("%B %e, %Y", localtime);
## 26 November 2001
} elsif ($style == "2") {
$date = strftime("%e %B %Y", localtime);
}
print "Content-type: text/html\n\n";
print "$date\n";
humbly -c
|