I have an array of an unknown number of words with an unknown maximum length. I need to convert it to another array, basically turning it into an array of columns. so with this source array:
@original_array = ("first", "base", "Thelongest12", "justAWORD4");
The resluting array will be:
@result_array = ("fbTj","iahu","rses","selt","t oA"," nW"," gO"," eR"," sD"," t4"," 1 "," 2 ");
In fact, I will have the following:
fbTj
iahu
rses
selt
t oA
nW
gO
eR
sD
t4
1
2
I need to do this to create a table, and these words are the table headers. I hope I have made it clear and appreciate the help you are ready to give.
I tried it with split function, but I keep messing it up ...
EDIT: Hello everyone, thanks for all the tips and suggestions! I learned a lot from all of you, therefore, above my head. However, I found tchrist's answer more convenient, maybe because I come from c, C # background ... :)