Re: Function parameter passing (was: Re: limit the list)

2002-11-25 Thread Jonathan E. Paton
You may be in luck, and it may do precisely what you want, but by the time you made sure it does, you've already wasted far too much time on it. Here is an example that mosty likely *not* do what you want: $i = 20; my($x, $y, $z) = ($i++, $i, $i++); This is a great example, as

Re: More fun with with lists and ++

2002-11-25 Thread Bernie Cosell
$i = 20; my($x, $y, $z) = ($i++, +$i, $i++); Here is a good addition to Bart's examples: my $i = 20; my ($x, $y, $z) = ($i++, -$i, $i++); print $x $y $z\n; Understanding the other examples... can you guess what does it prints? And the problem persists even if you make the

Re: Function parameter passing

2002-11-25 Thread Yitzchak Scott-Thoennes
On Mon, 25 Nov 2002 11:34:23 + (GMT), [EMAIL PROTECTED] wrote: $i = 20; my($x, $y, $z) = ($i++, $i, $i++); Now, it appears that perl's evaluation order is accident rather than design - so you SHOULD NOT rely on it. Avoid causing side-effects on variables you use more than once...