2010/7/15 Bryan R Harris <[email protected]>:
>
>
> Out of curiosity, is there a unary not operator in perl?
>
>  i.e.  "$a = $a+1"   is the same as   "$a++"
>
> Is there a similarly short form of "$a = !$a"?  Like "$a!!"?  (tried it and
> it didn't work.)
>

I dont think that's helpful much for the actual programming, since !$a
works fine enough.

C:\>perl -e "$a=0;print !$a"
1
C:\>perl -e "$a=1;print !$a"


-- 
Jeff Pang
http://home.arcor.de/pangj/

--
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
http://learn.perl.org/


Reply via email to