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

zip with ()

Thread Previous | Thread Next
From:
Andrew Shitov
Date:
July 31, 2005 10:44
Subject:
zip with ()
Message ID:
1846972468.20050731214453@shitov.ru
Hi,

I tried zip under pugs.

    my @odd = (1, 3, 5, 7);
    my @even = (2, 4, 6, 8);
    my @bothA = zip @odd, @even;
    print @bothA;

This code prints 12345678 as expected.

After parenthesis were used to group zip arguments, results changes
to 13572468. Is it right?
    
--
___________________________________________________________________________
Andrew, andy@shitov.ru
___________________________________________________________________________


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