develooper Front page | perl.beginners | Postings from January 2002

Re: What's the difference?????

Thread Previous | Thread Next
From:
Jeff 'japhy' Pinyan
Date:
January 30, 2002 15:15
Subject:
Re: What's the difference?????
Message ID:
Pine.GSO.4.21.0201301814190.27903-100000@crusoe.crusoe.net
On Jan 30, Nikola Janceski said:

>What's the difference between the following:
>
>! and not
>|| and or
>&& and and

Precedence.  See 'perlop'.  Basically:

  $x = 10 and 20;

sets $x to 10 (and warns that '20' is a useless use of a constant in void
context), whereas:

  $x = 10 && 20;

sets $x to 20.

-- 
Jeff "japhy" Pinyan      japhy@pobox.com      http://www.pobox.com/~japhy/
RPI Acacia brother #734   http://www.perlmonks.org/   http://www.cpan.org/
** Look for "Regular Expressions in Perl" published by Manning, in 2002 **
<stu> what does y/// stand for?  <tenderpuss> why, yansliterate of course.


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About