develooper Front page | perl.perl5.porters | Postings from June 2021

Re: RFC: Multiple-alias syntax for for

Thread Previous | Thread Next
From:
David Nicol
Date:
June 8, 2021 19:24
Subject:
Re: RFC: Multiple-alias syntax for for
Message ID:
CAFwScO_ZvTmdqRd+bBp-8g4c_phtCSRB-aEeEc0ZAi2W2OZvxQ@mail.gmail.com
Perl already has this feature.


@triples % 3 and die "TRIPLES ARRAY NOT MULTIPLE OF 3 IN LENGTH";
while (@triples){
    my ($foo, $bar, $baz) = splice @triples, 0, 3;
    ...
}




-- 
"Lay off that whiskey, and let that cocaine be!" -- Johnny Cash

Thread Previous | 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