freddo411 has asked for the wisdom of the Perl Monks concerning the following question:
This syntax works,
my %d = ( '1' => "expire_date", '2' => "submit_date", ); my @a = sort(keys(%d)) ; my $date_dd_str = CGI::popup_menu( -name => 'date_name', -values => \@a, -labels => \%d );
but, trying to this syntax gives an error:
my %d = ( '1' => "expire_date", '2' => "submit_date", ); my $date_dd_str = CGI::popup_menu( -name => 'date_name', -values => \sort(keys(%d)), -labels => \%d );
Can someone enlighten me on what I'm doing wrong?
How, syntactically, do I provide array syntax and then grab a reference to the result? (I think I said that right).
-------------------------------------
Nothing is too wonderful to be true
-- Michael Faraday
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Simple Array Syntax question
by Fletch (Bishop) on May 19, 2004 at 20:41 UTC | |
by freddo411 (Chaplain) on May 19, 2004 at 20:53 UTC | |
|
Re: Simple Array Syntax question
by dave_the_m (Monsignor) on May 19, 2004 at 20:34 UTC | |
|
Re: Simple Array Syntax question
by Plankton (Vicar) on May 19, 2004 at 20:41 UTC |