nmerriweather has asked for the wisdom of the Perl Monks concerning the following question:
unfortunately, that tends to return a scalar if there is 1 checkbox_field item, or an array if there are more.$this->{'ApacheRequest'}->param( "checkbox_field");
I discovered 'wantarray', but i know that i'm using it wrongmy @tmp = $this->{'ApacheRequest'}->param( "checkbox_field");
Can someone enlighten me please?my @tmp = wantarray : $this->{'ApacheRequest'}->param( "checkbox_field +") : @{$this->{'ApacheRequest'}->param( "checkbox_field")};
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Forcing a returned array (wantarray?)
by chromatic (Archbishop) on Feb 20, 2005 at 17:56 UTC | |
|
Re: Forcing a returned array (wantarray?)
by jdalbec (Deacon) on Feb 20, 2005 at 18:11 UTC | |
|
Re: Forcing a returned array (wantarray?)
by esskar (Deacon) on Feb 21, 2005 at 01:05 UTC | |
|
Re: Forcing a returned array (wantarray?)
by nmerriweather (Friar) on Feb 20, 2005 at 18:12 UTC |