On Apr 11, [EMAIL PROTECTED] said: >On Thu, Apr 11, 2002 at 11:13:44AM -0400, Jeff 'japhy' Pinyan wrote: >> On Apr 11, Jeff 'japhy' Pinyan said: >> >> ($a^$b)=~/\0*/*$+[0] > >Yeah, but does Perl actually garantee it will evaluate the >left operand of arithmetic operators first? If so, I cannot >find it in the documentation.
Well, I've never had that problem. pop() - pop() works as I expect it to, evaluating left-to-right. >Luckely, there's a 1-character length operator that is documented >to first evaluate the left operand, then the right: , > > ($a^$b)=~/\0*/,$+[0] Ah, but yours cannot be dropped in as an assignment, as mine can. $VAL = ($a^$b)=~/\0*/*$+[0]; $VAL = ($a^$b)=~/\0*/,$+[0]; However, if we assume a subroutine, the comma is ok. Honestly, I was going to use the comma, but I thought someone would complain as I just have -- so, kudos to you as well. -- Jeff "japhy" Pinyan [EMAIL PROTECTED] 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. [ I'm looking for programming work. If you like my work, let me know. ]
