Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: splitting 2D array into chunks

by shmem (Chancellor)
on Jun 21, 2021 at 18:46 UTC ( [id://11134128]=note: print w/replies, xml ) Need Help??


in reply to splitting 2D array into chunks

Your question is poorly formulated. Try again. It looks like you want the gaps too, in separate files.

Also, your description of the desired output is inconsistent. Why is

File-arr2-3.txt ---

if you don't have an empty slot in the 2d array?

Also, file File-arr1-8.txt seems to be missing - if both arrays are aligned. Then it should contain

arr1[9],arr1[10]

Hint: to write to files, you have to open them, then print to them, close them.
Can't say more about that.

perl -le'print map{pack c,($-++?1:13)+ord}split//,ESEL'

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (5)
As of 2024-03-28 11:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found