On Thu, Apr 11, 2002 at 01:43:31PM -0400, Jeff 'japhy' Pinyan wrote: > 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.
Well, yes. But how can you be sure this will always be the case? Perhaps in a next release, it won't. Is it documented to work this way, or does it just happen to work? > >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]; Well, it can be dropped in, you just have to know how to drop it! ;-) ($a^$b)=~/\0*/,$VAL = $+[0]; Abigail