Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

print "true" unless $MrCromeDome ne "dumbass"

by MrCromeDome (Deacon)
on Aug 16, 2001 at 20:17 UTC ( [id://105433]=note: print w/replies, xml ) Need Help??


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

Yeah, that will always print true ;)

It's pretty much the situation that you describe above. . . just a little bit different. Instead of this:

http://cygnus/cgi-bin/view.cgi?document=12345678&=name
I have this:
http://cygnus/cgi-bin/view.cgi?document=12345678&&tab=name
Note the &&. If I make it a single &, it seems to work fine. Seems like I made a pretty fatal typo there. I don't know if that indicates a problem with CGI or not (my guess is not), but I do know that things work fine without the second &.

Thanks for your help :)
MrCromeDome

Replies are listed 'Best First'.
Re: print "true" unless $MrCromeDome ne "dumbass"
by larryk (Friar) on Aug 16, 2001 at 23:52 UTC
    typo - yes
    fatal - shouldn't have been (IMHO)

    CGI.pm is basically doing
    #!/usr/bin/perl -w use strict; $_ = 'test1=1&&test3=3'; for ( split '&' ) { my($param,$value) = split '='; print "param='$param'\n"; print "value='$value'\n"; # and using $param even though it is undefined the 2nd time }
    You said that both versions of apache are the same but it looks like the two versions of CGI.pm are different - you can check ~ line 22 of CGI.pm for the version number.

    if they are the same then I'm stumped - otherwise you should probably upgrade to the newer one at least as it looks like it is handling malformed URLs properly (this type anyway).

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

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (5)
As of 2024-04-25 11:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found