I believe the Camel book says that EXPR1 if EXPR2; is synonymous with: EXPR2 && EXPR1; And that EXPR1 unless EXPR2; is synonymous with: EXPR2 || EXPR1; Well, I can't find this in perlsyn (or anywhere else). And I've not yet checked the Camel, but this is a SLIGHT untruth. I can say: $foo = (this() || that()); but I can't say: $foo = (that() unless this()); The reason I'm asking about this is because I was recently given a poser as to why: @array = (1,0,0,1,0); print scalar grep { 1 if !$_ } @array; print scalar grep { 1 unless $_ } @array; printed TWO different numbers. "Isn't unless $_ the same as if !$_?" Well, I had to convince them that the ``A if B'' is really ``B || A'', and it's not in the Perl docs, and I told them they had to believe me. :) -- MIDN 4/C PINYAN, NROTCURPI, US Naval Reserve japhy@pobox.com http://www.pobox.com/~japhy/ http://pinyaj.stu.rpi.edu/ PerlMonth - An Online Perl Magazine http://www.perlmonth.com/ The Perl Archive - Articles, Forums, etc. http://www.perlarchive.com/Thread Next