#!/usr/local/bin/perl -w use strict; use Data::Dumper; undef $/; my %t = <DATA> =~ /(\w{2})\s+((?:.+\n)(?:\s{2}.+\n)*)/g; grep { $t{$_} = [split /\n\s*/, $t{$_}]; } keys %t; print Dumper(\%t); __DATA__ T1 Line1 T2 Line2 Line3 Line4 T3 Line5 Line6 ER
In reply to Re: Parsing a Tagged File Format
by hossman
in thread Parsing a Tagged File Format
by arunhorne
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |