Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Perl CGI.PM: Use of uninitialized value $vals

by kcott (Chancellor)
on Apr 30, 2018 at 08:52 UTC ( #1213797=note: print w/replies, xml ) Need Help??


in reply to Perl CGI.PM: Use of uninitialized value $vals

It's generated by code something like these:

$ perl -wE 'my $vals; my $y = index($vals, "x")' Use of uninitialized value $vals in index at -e line 1. $ perl -wE 'my $vals; my $y = index("x", $vals)' Use of uninitialized value $vals in index at -e line 1.

Look in /homedir/perl5/lib/perl5/CGI.pm, go to line 1243, and start investigating from there.

— Ken

Replies are listed 'Best First'.
Re^2: Perl CGI.PM: Use of uninitialized value $vals
by Anonymous Monk on Apr 30, 2018 at 09:09 UTC
    I do not have code calling the method index, but rindex yes.

      What version of CGI do you have ?. In 3.65 the code was

      sub STORE { my $self = shift; my $tag = shift; my $vals = shift; my @vals = index($vals,"\0")!=-1 ? split("\0",$vals) : $vals; $self->param(-name=>$tag,-value=>\@vals); }

      In 4.37 it is

      sub STORE { my $self = shift; my $tag = shift; my $vals = shift; my @vals = defined($vals) && index($vals,"\0")!=-1 ? split("\0",$v +als) : $vals; $self->param(-name=>$tag,-value=>\@vals); }
      poj
        Was 4.22. Have upgraded to 4.38. Thank you)))

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1213797]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (3)
As of 2018-09-23 04:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Eventually, "covfefe" will come to mean:













    Results (190 votes). Check out past polls.

    Notices?
    • (Sep 10, 2018 at 22:53 UTC) Welcome new users!