in reply to Precendence and wantarray puzzling me
Your best option for conditionally assigning lists is the ternary conditional operator e.gperl -MO=Deparse - my @things = $q->param('t') or $q->param('things'); my @things = $q->param('t') || $q->param('things'); ^D $q->param('things') unless my(@things) = $q->param('t'); my(@things) = $q->param('t') || $q->param('things');
my @things = $q->param('t') ? $q->param('t') : $q->param('things');
_________
broquaint
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Precendence and wantarray puzzling me
by ViceRaid (Chaplain) on Mar 04, 2004 at 15:57 UTC | |
by broquaint (Abbot) on Mar 04, 2004 at 16:01 UTC |