Allow me to specify file format through XML, not coding.
You mean something like:
use XML::Simple; use Parse::FixedLength; my $x = XMLin(<<XMLEND); <format> <field> <fname>fld1</fname> <length>10</length> </field> <field> <fname>fld2</fname> <length>20</length> </field> <field> <fname>fld3</fname> <length>30</length> </field> </format> XMLEND my $fmt = [ map { "$_->{fname}:$_->{length}" } @{$x->{field}} ]; my $p = Parse::FixedLength->new($fmt);
Somehow I doubt you mean this, but you gotta start somewhere...(and I'm not clear on how XML makes this any better)
In reply to Re^2: RFC: Text::FixedWidth
by runrig
in thread RFC: Text::FixedWidth
by arc_of_descent
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |