in reply to Re: Text Formatting
in thread Text Formatting
I tried that, and here is my code.
Problems from my perspective with this code:use Text::Format; my $in_string = q(It should be clear to any frequent air passenger tha +t in order to reach one city from another, the cost of the shorter fl +ight may be more than the cost of longer flights. In other words, it +may pay you well to cool your heels in an airport waiting for a conne +cting flight rather than take a more direct flight or one in which th +e connecting time is shorter. For example, consider the following fli +ght schedule.); $text = Text::Format->new({ text => [$in_string], columns => 50, justify => 1, firstIndent => 0, } ); print $text->format;
2. The last line is not properly right-justified. It leaves all the spaces after the last word.
3. Justification should come at entire paragraph level and not just at 'line' level. So it's ok to have 2 or more spaces between the words if required, as long as entire paragraph is justfied within given 'box' of columns and lines as long as I don't see 'big' gaps between words.
Thanks,
Artist
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Text Formatting
by poj (Abbot) on Dec 22, 2002 at 18:54 UTC |