This is my source array:
my @raw_stack = (
'a1~a2~a3~a4~a5',
'b1~b2~b3~b4~b5',
'c1~c2~c3~c4~c5',
'd1~d2~d3~d4~d5',
'e1~e2~e3~e4~e5',
);
I want get the 3rd value in '~' pattern then place that to another array.
The other array should now look like this:
my @other_stack = (
'a3',
'b3',
'c3',
'd3',
'e3',
);
I could go about looping through the stack array then split
and push to another array, but i'm looking for a lean way
to code this.
Any ideas?