On Fri, 4 Feb 2005 04:09:03 +0800, Autrijus Tang <[EMAIL PROTECTED]> wrote:
...
Let's take the first one first, because it is what S06 seems to imply,
although it is against Perl5's tie() intuition:

    my @carton is Scalar;               # assuming this is the default

Now @carton implements the same set of behaviour as $spot.  It
essentially means that every variable is a scalar variable, and
the only different of @carton vs $spot is that @carton applies
list context to its right hand side in assignment and binding,
while $spot applies scalar context.

I asked that before, and answer was:
On Tue, 30 Nov 2004 14:13:52 -0800, Larry Wall wrote:
...
I think the only place they differ is in list context.  @a always
interpolates, and $a never does.
and everywhere else they would work the same.
rather little difference to have different "namespaces", huh?

I still have some doubts. How could I make a reference to array?
looks like this should work in perl6, because of scalar context:
  $arref = @arr;
or the perl5 way. is it the same somehow? or is it wrong in perl6?
  $arref = [EMAIL PROTECTED];

and the mentioned problem is interesting too..
my @array is Scalar; # this isn't the default, as I know
@array = (1,2,3);
how such a weird var would behave?
my $var = "test";
my @arr := $var;
error? or maybe it would be the same weirdness, like in former example? or maybe it's a ["test"]?

Reply via email to