and with the following sample data file:INST_FILE /usr/local/lib/perl5/5.8.0/Text/Wrap.pm INST_VERSION 2001.0929
and that yielded the following:Here is a sample file that contains longish lines of text to be wrapped. It also contains really long words, for example: superantidisestablishmentarianismabilityness, which weighs in at 45 characters (I think), counting the comma.
(Note that the last six characters of the long word were wrapped to the next line -- not five -- because Text::Wrap's notion of "column width" includes the line termination as part of the maximum allowed length.)Here is a sample file that contains longish lines of text to be wrapped. It also contains really long words, for example: superantidisestablishmentarianismabilit yness, which weighs in at 45 characters (I think), counting the comma.
So, I'm not seeing the problem you mention (the big word didn't just disappear -- it's still there, and is split into pieces according to the allowed max width). Maybe there's some other step in trip to your palm pilot where something is getting lost?
Personally, I find the "picket-fence" effect demonstrated with my test file to be really annoying -- it works better if you do chomp @text; before passing the array to "wrap()".
update: BTW, I assume your real code does print FH wrap(...); -- not just "print wrap(...)".
In reply to Re: Text::Wrap and Long words
by graff
in thread Text::Wrap and Long words
by gohaku
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |