you'll usually get better replies if you show what you've tried (with code).
Otherwise, you are, in effect, asking "please do this for me, for free, instead of your own work."
In fact, in this case, and being highly charitable about it, the "please" is only implicit!
for a hint, though...
- what's your longest field?;
- what perl operator could you use to pad those fields shorter than the longest to the length of the longest?
- and what would you still have left to do at that point?
Update: The last above is based on a guess that you want to create is classic "fixed length fields" -- where each field of each record is the same length, enabling use of pos to determine where one field ends and another begins. This, of course, may not be your intent... but if so refer to other's replies re ambiguity of your question, and to How do I post a question effectively?.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.