On Mon, Sep 11, 2006 at 11:12:00AM -0700, Larry Wall wrote:
: On Mon, Sep 04, 2006 at 08:54:02PM +0200, TSa wrote:
: : But are assignment ops allowed as initializer?
: : 
: :   my $z = $p but= { .y = 17 };
: 
: Why not?  It's only the first = that's potentially special.  (And it's
: only for non-my, since my's = is an ordinary assignment at normal
: run time.)  I don't see much syntactic difference between your example and
: 
:     state $z = $p += 17;
: 
: The fact that both of them modify $p in passing is unrelated to the
: eventual use of the value to initialize something else.

Well, okay, I should clarify that.  The meaning of "$p += 17" is
unrelated.  However, the declarator before the = does control when
and how often that expression is evaluated.

Larry

Reply via email to