in reply to Maintainable code is the best code Part II

I acknowledge this was not the point of your node.

but

although you can make an array slice out of unpack's results, you can also use a LHS undef for padding in these situations :

my $line="partnum partdesc color flavor "; my ($part, $desc, undef, $flava)= unpack "A10A10A10A10", $line; print "--\n$part\n$desc\n$flava\n--";

which I find easy to parse.