http://qs1969.pair.com?node_id=1233566

WoodyWeaver has asked for the wisdom of the Perl Monks concerning the following question:

Perl script has
use CGI; use CGI::Carp qw(warningsToBrowser fatalsToBrowser); use Data::Dump qw(dump);
In a global block
my $q = CGI->new; print '<!--', dump($q), "-->\n";
and a little later
if ($DEBUG) { print $q->hr; print $q->p('Debugging: '), $q->Dump, $q->hr; }
and in particular there is a parameter being passed, "orderby", which is set to 10, e.g
<li><strong>orderby</strong></li> <ul> <li>10</li>
A couple of the parameters direct execution of a subroutine, and in that subroutine
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;
but <!-- variables (index, desc) are (1, ) --> Why would index not be 10? What am I missing?