Bill Jastram wrote:

> We're getting closer. But lets say the first name of the first field in the first 
> row is 'Bill'. And the first name of the first field in the second row is 'Lanette'. 
> This command will not compensate for the difference in the length of the two first 
> names. So, the alignment of the second fields in each row will not be correct. And 
> so on ...
>
> Does this help you understand where I'm headed?
>
> Bill

Yes.  And printf, sprintf, or the perl format/write function pair should be able to 
help with this.  They should at least give you a starting point, because there are 
many ways to accomplish this task.  I prefer the printf, mostly because I'd rather 
just say expplictly how many spaces each field should occupy.  Others prefer using the 
format
function to provide a parameter for write(), because they see it as WYSIWYG.  Try them 
both and see which you feel more comfortable with for any given context.

Joseph



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to