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
In reply to (dkubb) Re: (1) One liner: split fixed-width field into equal length chunks...
by dkubb
in thread One liner: split fixed-width field into equal length chunks...
by mr. jaggers
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |