use strict; my $line = '='x60 ."\n"; #&RS; ⃜ #&SlurpAndSplit; sub RS { $/=q{}; while (){ if (s|\s*|$1|) { chomp; print $line.$_; } } } sub SlurpAndSplit { $/=undef; chomp(my @tables = split(/<\/TABLE>\s*/, )); print map { s|
|$1|; "$line$_" } @tables; } sub DotDot { my @wanted; while () { chomp; if (/
/ ) { if (/
/) { push(@wanted,$1); } elsif (/<\/TABLE>/) { print $line, map {"$_\n"} @wanted; @wanted = (); } else { push(@wanted,$_); } } } } __DATA__
FieldName1 VARCHAR(20) FieldName2 INT(20) FieldName3 BOOL
FieldName1 VARCHAR(20) FieldName2 INT(20) FieldName3 BOOL