Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re^3: How Perl can push array into array and then how retrieve

by choroba (Archbishop)
on Nov 25, 2021 at 14:16 UTC ( #11139117=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my @f;
    for my $i (0 .. 20) {
    ...
        push @f, \@e;
    }
    print map "(@$_)", @f
    
  2. or download this
    for (my $i = 0; $i <= 40; $i += 2) {
        my @e = ($i, $i + 1);
        push @f, \@e;
    }
    
  3. or download this
    for my $i (grep 0 == $_ % 2, 0 .. 40) {
        my @e = ($i, $i + 1);
        push @f, \@e;
    }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11139117]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (5)
As of 2022-05-29 09:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you prefer to work remotely?



    Results (101 votes). Check out past polls.

    Notices?