http://qs321.pair.com?node_id=245024


in reply to One liner: split fixed-width field into equal length chunks...

If you're using perl 5.8 you can use the new sub-template function in unpack:

my @d = unpack "(A$n)*", $string;

Dan Kubb, Perl Programmer