felwick has asked for the wisdom of the Perl Monks concerning the following question:
in the next sub however, instead of hardcoding the @array values, i need to get the value of 15 form elements. when i use the following:my @array = ("AOL", "Yahoo", "Ask Jeeves/Ask.com", "Alltheweb", "Alta +Vista", "Lycos", "iWon", "Teoma", "Wisenut", "MSN", "Netscape", "Info +space", "Looksmart"); shuffle(@array); my ($comp1, $comp2, $comp3, $comp4, $comp5) = @array[0..4]; print qq~ <input type="hidden" name="comp1" value="$comp1"> <input type="hidden" name="comp2" value="$comp2"> <input type="hidden" name="comp3" value="$comp3"> <input type="hidden" name="comp4" value="$comp4"> <input type="hidden" name="comp5" value="$comp5"> ~;
i get the param name - not the value. what am i doing wrong?!my @array= param('aware02', 'aware03', 'aware04', 'aware05', 'aware06' +, 'aware07', 'aware08', 'aware09', 'aware10', 'aware11', 'aware12', ' +aware13', 'aware14');
thanks again...
felwick
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: random array - a newer twist
by Zaxo (Archbishop) on Nov 05, 2002 at 22:39 UTC | |
by felwick (Sexton) on Nov 05, 2002 at 23:13 UTC | |
by Zaxo (Archbishop) on Nov 05, 2002 at 23:24 UTC | |
by Anonymous Monk on Nov 05, 2002 at 23:42 UTC |