Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Re: Passing variables to an SSI script

by c (Hermit)
on Nov 27, 2001 at 04:06 UTC ( [id://127669]=note: print w/replies, xml ) Need Help??


in reply to Re: Passing variables to an SSI script
in thread Passing variables to an SSI script

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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://127669]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (2)
As of 2024-04-26 06:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found