Bill Jastram <[EMAIL PROTECTED]> wrote:

Can you give an example of what you want your output to look like?

>From what I am hearing you say, you probably should be using 'format', as one
already responded.


-Jeff


> 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 if that won't work for you, check out the 'format' command, 
> >you can
> >do lots of slick stuff with it, like centering.
> >
> >-Tom Kinzer
> >
> >-----Original Message-----
> >From: James Edward Gray II [mailto:[EMAIL PROTECTED]
> >Sent: Friday, December 19, 2003 9:16 AM
> >To: Bill Jastram
> >Cc: Perl List
> >Subject: Re: Align Text
> >
> >
> >On Dec 19, 2003, at 8:29 AM, Bill Jastram wrote:
> >
> >> James:
> >>
> >> A coupe of things.
> >>
> >> #1. Pardon my ignorance, but I'm not sure how to use the list 
> >where I
> >> found the reply button to e-mail you directly. I could not find a 
> >way
> >> to
> >> add to the already existing 'thread'. Your help would be 
> >appreciated.
> >
> >The list is just another address you can send your messages too:
> >
> >[EMAIL PROTECTED]
> >
> >A lot of people just hit "Reply All" if their mail client has such a
> >button.  In the case of this message, that would send your answer to 
> >me
> >and the list.
> >
> >> #2. The challenge with the use of %20s is that in the next row of
> >> records
> >> the names will not be aligned (flush left) with the row above, if the
> >> names are not the same length. This is my dilemma.
> >
> >Correct, but they will be aligned flush right.  For flush left, we just
> >change the pattern a little:
> >
> > > perl -e 'printf "%-20s %-20s %-20s\n", "James", "Edward", "Gray"'
> >James                Edward               Gray
> >
> >Does that answer your question?
> >
> >James
> >
> >
> >--
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> ><http://learn.perl.org/> <http://learn.perl.org/first-response>
> >
> >
> 
> -- 
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> <http://learn.perl.org/> <http://learn.perl.org/first-response>
> 
> 


__________________________________
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing.
http://photos.yahoo.com/

-- 
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