Hello,
Looking for style advice here.
I'm trying to populate records into a flat-file layout
for transfer to a mainframe (offtopic: the FAXed file
layout I received says "prior revision: 11/01/81".
Sweet!).
Anyway, the layout requires that numerics be
zero-filled to the left, so a 3-byte field containing
the number 7 would show as 007 in the file. The
layout contains only alphanumerics, nothing fancy.
I would prefer to write each record using pack, but I
can't see how to elegantly get pack to zero-fill
without using sprintf. And I kind of feel like once
I'm using sprintf I might as well ONLY use sprintf for
the whole record. And *that* doesn't feel very
Perlish to me, so I suspect there's a different
solution.
Thanks in advance for your thoughts!
Chris
__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/