#! perl -slw use strict; my @names; my $fmt; my( @col1, @col2 ); while( ) { if( m[INTERESTING CODE--] .. m[^\s*$] ) { if( m[^\s*$] ) { print join', ', grep defined, @col1, @col2; @names = @col1 = @col2 = (); undef $fmt; next; } if( m[^[\s-]+$] ) { $fmt .= "\@$-[-1] A${ \( $+[-1]-$-[-1]) }" while m[\s+([-]+)]g; next; } next unless $fmt; $_ .= chr(0)x100; ( undef, $col1[@col1], undef, $col2[@col2] ) = unpack $fmt, $_; } }