in reply to text processing - convert list of vectors to tabular format

Having asked myself how to involve Perl's range operator, I came up with the following

use strict; use warnings; $\ = $/; while (<DATA>) { chomp; my $v= ((/{/ .. /}/) || 0); if ($v==1) { @_=(); } elsif ($v=~/E0$/) { print "@_"; } else { push @_, $_; } }
__DATA__ v_x { x1 x2 x3 x4 x5 x6 x7 x8 } garbage filtered out v_y { y1 y2 y3 y4 y5 } v_z { z1 z2 z3 z4 z5 z6 }
Edit: Hm, somewhat inchoate, since it doesn't address the OP's requirement to transpose the result.

You can use the above with

push @collect, [@_];

instead of the print statement (declare @collect prior to the loop) and use any suggested method here or in the other mentioned thread to transpose and output that AoA.