raiph skribis 2007-06-29  1:10 (-0700):
>       system('cls' !! 'clear' ?? ($?OS eq any <MSWin32 mingw>));

I read this as: given 'cls', use 'clear' if not, and ($?OS eq ...) if
so. Which doesn't make sense, because 'cls' is always true.

Note that I ofter write ternaries on three lines:

    condition
        ?? if_so
        !! if_not

And that's probably why I read your example as

    condition
        !! if_not
        ?? is_so

Instead of

    if_not !!
    if_so  ??
    condition

(I have no idea how this could be indented in a useful way.)

And this ambiguity is, IMO, more than enough reason to disallow this. As
for the end weight problem, try formatting the thing in three lines like
I do. That quickly makes it readable again:

    system $?OS eq any <MSWin32 mingw>
        ?? 'cls'
        !! 'clear';

This puts "system", "cls" and "clear" all on the left side.
-- 
korajn salutojn,

  juerd waalboer:  perl hacker  <[EMAIL PROTECTED]>  <http://juerd.nl/sig>
  convolution:     ict solutions and consultancy <[EMAIL PROTECTED]>

Reply via email to