You are getting the message as a function of the -w switch on the #! line. Any non-quoted text is first interpreted as a command or subroutine. If none match, it is considered a bareword and is typically resolved to string, but recommended against as the word could be a future command. In your case, I think the ambiguity comes from the '-' leading the string, as Perl isn't sure whether you mean subtract or as part of the string. You should encase the parameter names in quotes to remove any ambiguity. The values parameter takes a reference to an array or list. Check the docs for references and you will find your answer. -K "To argue with a man who has renounced his reason is like giving medicine to the dead." - Thomas Paine > From: Mike Schienle <mgs@ivsoftware.com> > Date: Fri, 31 Mar 2000 15:55:31 -0800 > To: macperl@macperl.org > Subject: [MacPerl] CGI scrolling_list > > Hi all - > > I'd like to use an array as part of an argument to scrolling_list > (part of CGI module), but I'm having some kind of mental block in > making it happen. This is my first use of CGI, so assume nothing is > obvious :-) > > Here's something to give the idea: > #!/usr/bin/perl -w > use CGI qw(:standard :html3); > @city = qw(Dallas Phoenix Tucson Lompoc); > print "@city\n"; > print scrolling_list(-name=>'mapList', -values=>["test1", "test2"], > -size=>8, -multiple=>'true'); > > > And here's the output of the above (via droplet): > # Ambiguous use of values => resolved to "values" =>. > File 'Aleutian:Data:IV:Zoom:test'; Line 5 > Dallas Phoenix Tucson Lompoc > <SELECT NAME="mapList" SIZE=8 MULTIPLE> > <OPTION VALUE="test1">test1 > <OPTION VALUE="test2">test2 > </SELECT> > > > The first and probably very related question is about the ambiguous > use statement mentioned in the output (and in the "Check Syntax" > step). The next question is how can I put the @city array into the > scrolling_list command? Everything I've tried has met with no success. > > I've also tried running it on MachTen, just to see what's going on. > Here is the output: > mgs@teton(116)% cat test.input > val=1 > mgs@teton(117)% test.pl < test.input > Dallas Phoenix Tucson Lompoc > (offline mode: enter name=value pairs on standard input) > <SELECT NAME="mapList" SIZE=8 MULTIPLE> > <OPTION VALUE="test1">test1 > <OPTION VALUE="test2">test2 > </SELECT> > -- > > Mike Schienle Interactive Visuals, Inc. > mgs@ivsoftware.com Remote Sensing and Image Processing > http://www.ivsoftware.com/ Analysis and Application Development > > # ===== Want to unsubscribe from this list? > # ===== Send mail with body "unsubscribe" to macperl-request@macperl.org > # ===== Want to unsubscribe from this list? # ===== Send mail with body "unsubscribe" to macperl-request@macperl.org