If list contruction is greedy, that would make all binary ops be greedy as well.
If foo $x,$y,$z is greedy beacuse it means foo($x,$y,$z) and not foo($x),$y,$z,
then foo $x+$y+$z is greedy beacuse it means foo($x+$y+$z) and not foo($x)+$y+$z.
I think we don't talk of list being because it's easier to think it terms of how many operands are required. (e.g. 0, 3 or 4, any number, etc) Besides, it's just too inconsistent.
foo $x,$y,$z means foo($x,$y,$z) For functions, bar $x,$y,$z doesn't mean bar($x,$y,$z) it depends on the +prototype. print $x,$y,$z means print($x,$y,$z) For named operators, chr $x,$y,$z doesn't mean chr($x,$y,$z) it depends on the +prototype. not $x+$y+$z means not($x+$y+$z) For other operators, ! $x+$y+$z doesn't mean !($x,$y,$z) it depends on the +precedence.
In reply to Re: Other form of greediness in Perl
by ikegami
in thread Other form of greediness in Perl
by naikonta
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |