the error message refers to $param being undefined...

it looks like the parameter name is not defined and (in my version of CGI.pm at least) this looks like a problem...

# from CGI.pm sub parse_params { my($self,$tosplit) = @_; my(@pairs) = split(/[&;]/,$tosplit); my($param,$value); foreach (@pairs) { ($param,$value) = split('=',$_,2); $value = '' unless defined $value; $param = unescape($param); # this is where the situation goes unchecked... # CGI::Util::unescape returns undef if $param is undef # none the wiser and no error checking! $value = unescape($value); $self->add_parameter($param); push (@{$self->{$param}},$value); } }
so my guess is that you have a URL like:
http://your.site.here/cgi-bin/script.pl?param1=value1&=value2&param3=v +alue3
which is lacking "param2" and would cause the issue you are seeing. try adding...
next unless defined $param;
where I put the 3 line comment inside the parse_params sub

hope this helps

update: if this does turn out to be the problem you may want to check if the most recent version has the same problem - if so you can email the author(s) and let him/her/them know you have discovered a bug

   larryk                                          
perl -le "s,,reverse killer,e,y,rifle,lycra,,print"

In reply to (larryk) possible bug in CGI.pm - Re: Perl, Apache, Dr. Watson, and my scripts by larryk
in thread Perl, Apache, Dr. Watson, and my scripts by MrCromeDome

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • 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:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.