On Sat, Jul 30, 2005 at 09:40:11AM -0700, Larry Wall wrote:
> Right, so I guess what really happens is ref autogeneration in that
> case, and there's no difference between
>
> $x = @array;
> $x := @array;
>
> Hey, who said anything about consistency? :-)
Hm, not exactly. This form:
On Sat, Jul 30, 2005 at 05:17:29PM +0200, Ingo Blechschmidt wrote:
: Hi,
:
: Larry Wall wrote:
: > Except that you've rebound the container. Hmm, maybe the original
: > binding is an error.
:
: what about:
:
: sub foo (Array $arrayref) {...}
:
: my @array = ;
: foo @array;
:
: The
Hi,
Larry Wall wrote:
> Except that you've rebound the container. Hmm, maybe the original
> binding is an error.
what about:
sub foo (Array $arrayref) {...}
my @array = ;
foo @array;
The binding used by the parameter binding code does not use the
standard := operator then, right?
Hi,
Larry Wall wrote:
> On Sat, Jul 30, 2005 at 02:33:15PM +0200, Ingo Blechschmidt wrote:
> : my @array = ;
> : my $arrayref := @array;
[...]
> : $arrayref = 42;# !!! 42 is not a Ref of Array
> :
> : Should the last line be treated as
> : $arrayref = (42,);
> : wh
Except that you've rebound the container. Hmm, maybe the original
binding is an error.
Larry
On Sat, Jul 30, 2005 at 02:33:15PM +0200, Ingo Blechschmidt wrote:
: Hi,
:
: my @array = ;
: my $arrayref := @array;
:
: push $arrayref, "c";
: say [EMAIL PROTECTED]; # a b c d, no problem
:
: $arrayref = [];
: say [EMAIL PROTECTED]; # d e
Hi,
my @array = ;
my $arrayref := @array;
push $arrayref, "c";
say [EMAIL PROTECTED]; # a b c d, no problem
$arrayref = [];
say [EMAIL PROTECTED]; # d e f, still no problem
$arrayref = 42;# !!! 42 is not a Ref of Array
Sho