in reply to Re: Precendence and wantarray puzzling me
in thread Precendence and wantarray puzzling me

Ah, thanks all. I was put off by the fact that:

my @things = $q->param('t') || $q->param('things');

didn't DWIM, as the || puts each method call in scalar context. As an aside, how could one force list context for the evaluation of each of those method calls? With my imaginary list counterpart to scalar:

my @things = list($q->param('t')) || list($q->param('things'));

Replies are listed 'Best First'.
Re: Re: Re: Precendence and wantarray puzzling me
by broquaint (Abbot) on Mar 04, 2004 at 16:01 UTC
    It can't be done (forcing list context with || that is), hence the ?: suggestion.
    HTH

    _________
    broquaint