On Monday 30 July 2001 07:29 am, Bart Lateur wrote:
> On Sun, 29 Jul 2001 19:36:43 -0400, Bryan C. Warnock wrote:
> >$x = ($default,$a,$b)[$b<=>$a];  # Much like I did before
>
> Note that
>
>       $x = cond? a : b
>
> does lazy evaluation, i.e. the value for a or for b is only fetched when
> it's actually needed. In your construct, they're all fetched anyway,
> before the condition is even checked.

Excellent point.  Something to remember for the future.

-- 
Bryan C. Warnock
[EMAIL PROTECTED]

Reply via email to