Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: List into two-dimensional array

by tybalt89 (Monsignor)
on Dec 14, 2020 at 22:23 UTC ( [id://11125200]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl
    
    ...
      @{ $AoA[-1] } < $C ? $_ : [ $_ ] for @list;
    
    use Data::Dump 'dd'; dd \@list; dd \@AoA;
    
  2. or download this
    [1 .. 12]
    [[1 .. 4], [5 .. 8], [9 .. 12]]
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (6)
As of 2024-03-28 19:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found