- or download this
$/ = undef or
$data = <> and
...
}{$1 ? (($t=$1),"") : "$t.$2"}mexg;
print $data;
- or download this
perl -e '$/=undef or $_=<> and s{^TABLE;([^;\n]+).*$|^COLUMN;(.+?);.*$
+}{$1?(($t=$1),""):"$t.$2"}mexg and print;' data.txt
- or download this
perl -e'local$/or$_=<>,s{^TABLE;(.+?)$|^COLUMN;(.+?);.*$}{$1?(($t=$1),
+""):"$t.$2"}mexg and print;' data.txt