Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Passing variables to an SSI script

by tune (Curate)
on Nov 27, 2001 at 03:57 UTC ( [id://127664]=note: print w/replies, xml ) Need Help??


in reply to Passing variables to an SSI script

You can use the first method only
<!--#exec cmd="cgi-bin/date.cgi --style=5"-->
That should work. Perhaps if you show more of your code, someone will be able to help.

Greetings,

--
tune

Replies are listed 'Best First'.
Re: Re: Passing variables to an SSI script
by c (Hermit) on Nov 27, 2001 at 04:06 UTC
    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://127664]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (5)
As of 2024-03-29 09:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found