in reply to Using pack with data of odd lengths

Isn't this work pack should be able to do?

pack's main purpose is to convert between Perl and machine numbers. vec is the function designed for bit work. Unfortunately, vec only works with fields which are powers of 2 in size.