in reply to pack/unpack left padding

unpack does what the documentation says it does: it extracts six characters into a string.

If you want to get rid of the whitespace padding, you can just use it in numerical context:

$ perl -wle 'print ">", 0+" 123";' >123

Note that a blank is nothing special to unpack.