in reply to RE: RE (2): pack / unpack woes
in thread pack / unpack woes

...although that won't truncate elements that are too big :(
It will if you use
my $tmpl = "%-3.3s|%-4.4s|%-5.5s";
The value after the dot gives a "maximum width".

-- Randal L. Schwartz, Perl hacker