in reply to Re^2: Ternary if versus normal if question
in thread Ternary if versus normal if question

I looked for a solution with ^=, but it doesn't work unless it can be made into a unary operator at which point I gave up looking down that route. Your suggestion only turns the light on when off but does not turn it off when on.

-M

Free your mind

  • Comment on Re^3: Ternary if versus normal if question

Replies are listed 'Best First'.
Re^4: Ternary if versus normal if question
by lidden (Curate) on Nov 19, 2005 at 15:15 UTC
    $ perl -wle '$a=0; $a ^= 1; print $a' 1 $ perl -wle '$a=1; $a ^= 1; print $a' 0
      Hmm looks like you are right - I tested exactly this, with a slightly different script and got a 1 for both cases but the above test looks right and does suggest it works after all. If the problem is an inaccesible NFS mountpoint, how about dismounting it just from your local system during the installation?

      -M

      Free your mind