I have been trying to get this script to work for hours. the problem is that it won't branch to anything but the FrontPage sub I have checked the param values and they are ok but but it still wont branch. I'm running it on a solarus::apache::mod_perl box.
#!/usr/bin/perl -w
use CGI::Carp "fatalsToBrowser";
use CGI;
use strict;
$CGI::POST_MAX=1024 * 500; # max 500k post
$CGI::DISABLE_UPLOADS = 1; # No uploads
my ($q) = new CGI;
my ($ThisScript, $DataFile, $i, $MyFile);
my (%Subs);
$ThisScript = 'Conf.cgi';
$DataFile = './data/list.txt';
%Subs=(
'FrontPage' => \&FrontPage(),
'ViewState' => \&ViewState());
if ( exists $Subs{$q->param('do')}) {
$Subs{$q->param('do')}->();
} else {
$Subs{$q->param('do')}->();
}
exit;
sub FrontPage {
...
exit;
}
sub ViewState {
...
exit;
}
------ The Price of Freedom is Eternal Vigilance
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|