So I have this script that produces 2 different arrays by reading data from a file, the 2 arrays look something like this:
Array #1:
4.12 0
5.13 1
6.14 0
Array #2
16.37 0????" 8 0 0 0
19.26 0????" 9 0 0 0
22.21 0????" 0 0 0 0
So what I want to do is combine them into one array that looks like this:
Combined Array:
4.12 0 16.37 0????" 8 0 0 0
5.13 1 19.26 0????" 9 0 0 0
6.14 0 22.21 0????" 0 0 0 0
I thought I could do something like:
@Combined = join(@Array1, @Array2);
But that doesn't work.
And at some point, either before or after combining I would like to get rid of some of those columns...the ones with the ????, and the ones with only 0's so it would then look like this:
4.12 0 16.37 8
5.13 1 19.26 9
6.14 0 22.21 0
Array #1:
4.12 0
5.13 1
6.14 0
Array #2
16.37 0????" 8 0 0 0
19.26 0????" 9 0 0 0
22.21 0????" 0 0 0 0
So what I want to do is combine them into one array that looks like this:
Combined Array:
4.12 0 16.37 0????" 8 0 0 0
5.13 1 19.26 0????" 9 0 0 0
6.14 0 22.21 0????" 0 0 0 0
I thought I could do something like:
@Combined = join(@Array1, @Array2);
But that doesn't work.
And at some point, either before or after combining I would like to get rid of some of those columns...the ones with the ????, and the ones with only 0's so it would then look like this:
4.12 0 16.37 8
5.13 1 19.26 9
6.14 0 22.21 0