Hi,
my @array = <a b c>;
my $arrayref := @array;
push $arrayref, "c";
say [EMAIL PROTECTED]; # a b c d, no problem
$arrayref = [<d e f>];
say [EMAIL PROTECTED]; # d e f, still no problem
$arrayref = 42; # !!! 42 is not a Ref of Array
Should the last line be treated as
$arrayref = (42,);
which, as the LHS is in scalar context, would auto-referize to
$arrayref = [42];
which would work?
Or should that be an error?
(FWIW, I favour option 2.)
--Ingo
--
Linux, the choice of a GNU | Row, row, row your bits, gently down the
generation on a dual AMD | stream...
Athlon! |