On 1/5/06, TSa <[EMAIL PROTECTED]> wrote:
> Jonathan Lang wrote:
> > Therefore,
> >
> >   $x = 3;
> >   if $x <= 1 & 5 {say 'smaller'}
> >   if $x > 1 & 5 {say 'larger'}
> >
> > should produce exactly the same output as
> >
> >   $x = 3;
> >   if $x <= 1 && $x <= 5 {say 'smaller'}
>
> This is slightly untrue. because if the junction contains two
> identical values or an undef ordered object the < part is
> essentially stripped away:
>
>      if $x <= 5 && $x <= 5 {say 'smaller'}
>
> can be permuted into
>
>      if $x <= 5 && 5 > $x {say 'smaller'}
>
> and optimized to
>
>      if $x == 5 {say 'smaller'}

Do you claim that
  if $x <= 5 && $x <= 5 {say 'smaller'}
is same as
  if $x == 5 {say 'smaller'}

--
Markus Laire

Reply via email to