in reply to Writing Fixed Flat Files

I like Parse::FixedLength. Lots of examples in the docs and/or tests. Though it is really just a wrapper around pack/unpack.
pack is more appropriate for fixed width than sprintf.