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

for @list ⊂

Thread Next
From:
Rod Adams
Date:
March 12, 2005 17:48
Subject:
for @list ⊂
Message ID:
42339BEB.6080702@rodadams.net
Are the following all legal and equivalent?

    for 1..10 -> $a, $b { say $a, $b };

    for 1..10 { say $^a, $^b };

    sub foo ($a, $b) { say $a, $b };
    for 1..10 &foo;


What happens with:

    for 1..10 -> *@a { say @a };



-- Rod Adams

   




   

Thread Next


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