If the field width of each column is not fixed and you don't know the max length of each field, then you'll probably need to read-in the full data into an array (maybe a 2d array) and then calculate each field width. I have not done any testing, but my first thought would be to use the Array::Transpose and List::Util modules in this calculation process.
In reply to Re^3: Writing Fixed Flat Files
by fishmonger
in thread Writing Fixed Flat Files
by coffeeslob
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |