Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re^3: Rosetta code: Split an array into chunks

by tybalt89 (Monsignor)
on Oct 22, 2021 at 17:57 UTC ( [id://11137894]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl
    
    ...
    my $v2 = chunk_array(3, "a", "bb", "c", "d", "e", "f");
    $v2 eq "a bb c\nd e f\n" or die "error: '$v2'\n";
    print $v2;
    
  2. or download this
    a bb c
    d e f
    ...
    ------------------------------
    a bb c
    d e f
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (2)
As of 2024-04-20 04:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found