There's more than one way to do things | |
PerlMonks |
Re: splitting 2D array into chunksby shmem (Chancellor) |
on Jun 21, 2021 at 18:46 UTC ( [id://11134128]=note: print w/replies, xml ) | Need Help?? |
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
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
Hint: to write to files, you have to open them, then print to them, close them.
perl -le'print map{pack c,($-++?1:13)+ord}split//,ESEL'
In Section
Seekers of Perl Wisdom
|
|