WoodyWeaver has asked for the wisdom of the Perl Monks concerning the following question:
Perl script has
In a global blockuse CGI; use CGI::Carp qw(warningsToBrowser fatalsToBrowser); use Data::Dump qw(dump);
and a little latermy $q = CGI->new; print '<!--', dump($q), "-->\n";
and in particular there is a parameter being passed, "orderby", which is set to 10, e.gif ($DEBUG) { print $q->hr; print $q->p('Debugging: '), $q->Dump, $q->hr; }
A couple of the parameters direct execution of a subroutine, and in that subroutine<li><strong>orderby</strong></li> <ul> <li>10</li>
but <!-- variables (index, desc) are (1, ) --> Why would index not be 10? What am I missing?my $index = $q->param('orderby'); my $desc = $q->param('desc'); $index = 1 if not defined $index; print "\n<!-- variables (index, desc) are ($index, $desc) -->\n" if +$DEBUG;
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: CGI scoping question
by huck (Prior) on May 10, 2019 at 17:35 UTC | |
by WoodyWeaver (Monk) on May 10, 2019 at 18:14 UTC | |
by haukex (Archbishop) on May 10, 2019 at 18:26 UTC | |
by WoodyWeaver (Monk) on May 10, 2019 at 18:47 UTC | |
by Anonymous Monk on May 16, 2019 at 23:47 UTC | |
by tangent (Parson) on May 10, 2019 at 18:33 UTC | |
by WoodyWeaver (Monk) on May 10, 2019 at 18:57 UTC | |
Re: CGI scoping question
by poj (Abbot) on May 10, 2019 at 18:05 UTC | |
by WoodyWeaver (Monk) on May 10, 2019 at 18:22 UTC | |
Re: CGI scoping question
by WoodyWeaver (Monk) on May 16, 2019 at 13:52 UTC | |
by poj (Abbot) on May 16, 2019 at 19:24 UTC |
Back to
Seekers of Perl Wisdom