On Thu, Jul 15, 2010 at 02:32, Bryan R Harris
<[email protected]> wrote:
>
>
> 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.)
snip

No, you can say

$a = !a;

or

$a != $a;

You can find all of the Perl 5 operators in perldoc perlop,
http://perldoc.perl.org/perlop.html, or
http://cowens.github.com/perlopquick/perlopquick.html


-- 
Chas. Owens
wonkden.net
The most important skill a programmer can have is the ability to read.

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


Reply via email to