develooper Front page | perl.perl6.language | Postings from August 2005

Re: @array = $scalar

Thread Previous
From:
Juerd
Date:
August 31, 2005 06:38
Subject:
Re: @array = $scalar
Message ID:
20050831132424.GJ7858@c4.convolution.nl
Ingo Blechschmidt skribis 2005-08-31 13:22 (+0000):
>     @array = $arrayref;                  # really means 
>     @array = ($arrayref,);               # same as 
>     @array = (); @array[0] = $arrayref;  # thus 
>     say +@array;                         # always 1 
>     # Correct? 

Yes, although at some point there was this weird notion of scalars
automatically dereferencing in list context, in this respect Perl 6
currently is sane.


Juerd
-- 
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html 
http://convolution.nl/gajigu_juerd_n.html

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About