S06.pod says (line 2698):
: Ordinarily a top-level Perl "script" just evaluates its anonymous
: mainline code and exits. During the mainline code, the program's
: arguments are available in raw form from the C<@ARGS> array. At the end of
: the mainline code, however, a C subroutine will be calle
In general, is
[op] (p1,p2,p3,p4...)
expected to return the same result as
p1 op p2 op p3 op p4...
including precedence considerations?
That is, should
[**](2,3,4)
return 2^(3^4)=2^81, or (2^3)^4 = 4096?
--
Mark J. Reed <[EMAIL PROTECTED]>
Author: larry
Date: Sat Mar 29 20:16:29 2008
New Revision: 14529
Modified:
doc/trunk/design/syn/S06.pod
Log:
fossil noticed by pmichaud++
Modified: doc/trunk/design/syn/S06.pod
==
--- doc/trunk/design/syn/S06.pod
On Sat, Mar 29, 2008 at 10:18:53PM -0400, Mark J. Reed wrote:
: In general, is
:
: [op] (p1,p2,p3,p4...)
:
: expected to return the same result as
:
: p1 op p2 op p3 op p4...
:
: including precedence considerations?
:
: That is, should
:
: [**](2,3,4)
:
: return 2^(3^4)=2^81, or (2^3)^4 = 40
You anticipated me. So, is there a core method for
foldl/foldr/inject/reduce, or do you have to roll your own as in p5?
On 3/29/08, Larry Wall <[EMAIL PROTECTED]> wrote:
> On Sat, Mar 29, 2008 at 10:18:53PM -0400, Mark J. Reed wrote:
> : In general, is
> :
> : [op] (p1,p2,p3,p4...)
> :
> : expec