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
In reply to Re: Precendence and wantarray puzzling me
by broquaint
in thread Precendence and wantarray puzzling me
by ViceRaid
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |