Hi,
I've been searching for an answer to this and can't find anything like it ... although I think that the fix will end up being simple.
The following code runs on a commercial server I have access to, and generates the calendar I want. When I run it on my RedHat 9.0 Linux box running Apache and mod_perl, though, it runs, but $ARGV[0] never makes it to $Month so it doesn't generate the calendar. I don't get any errors except that I am trying to use a variable ($Month) that has not been initialized.
I have tried other scripts that I know to work and they also fail to pass the $ARGV[0].
I don't know if this matters, but I had problems running scripts from Apache at all until I installed the mod_perl module ... perl runs fine from the command line, though.
#! /usr/local/bin/perl -w
my $Month = $ARGV[0];
use strict;
#$Month = 3; # if I uncomment this like it also works fine
print "Content-type: text/html\n\n";
print "<html>\n <head>\n <title>file viewer</title>\n </head>\n";
print "<body>\n";
print @ARGV; #this shows nothing on my Apache server
&Calendar($Month,2005,1); #Print a calendar for a month in 2005
print "</body></html>\n";
Thanks so much!
Saands
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.