Skip to main content.
home | support | download

Back to List Archive

Re: "Ambiguous use" swish.cgi error

From: Bill Moseley <moseley(at)not-real.hank.org>
Date: Mon Jan 28 2002 - 18:49:00 GMT
At 09:51 AM 01/28/02 -0800, Kate Ericson wrote:
>Thanks for your quick reply -- looks like you've helped a lot of people out 
>on this discussion board.  The ambiguous use errors were eliminated by 
>putting quotes around reserved words, but I still crash with the following 
>error:
>
>syntax error at ./swish.cgi line 693, near ") for "

>My perl -v is:
>This is perl, version 5.005_03 built for sun4-solaris

Make sure that the #! line of the swish.cgi program really points to that
correct version of perl.

On my copy that line is:

        push @query_string,  "$p=" . $q->escape( $_ ) for @settings;

That might be an issue with your version of CGI.  I run swish.cgi on
5.00503 so I don't think it's your version of perl, if that's really what
the script is using.

You can try replacing that line with :

        push @query_string,  "$p=$_" for @settings;


if that doesn't work try this (but I can't believe this would be the problem)

        for my $setting ( @settings )
            push @query_string, "$p=$setting";
        }  

Anyway, that might be helpful for debugging:

        for my $setting ( @settings )
            $setting = $q->escape( $setting );
            push @query_string, "$p=$setting";
        }  

That should give a better error message and show where the problem is.

>I can try to get our sys admin. to upgrade perl, but if you have an 
>alternate solution that would be great....

It's best to avoid the sys admin at all costs ;)  5.00503 should be fine.



-- 
Bill Moseley
mailto:moseley@hank.org
Received on Mon Jan 28 18:49:33 2002