in reply to combining lists, formatting and printing on windows
Easiest answer for Q1 probably is lcfirst, at least as long as none of your causes don't start out with a proper name, which lcfirst also would mercilessly "downsize" :-)
As for Q2, first thing that comes to my mind is fmt, but perhaps Text::Format suits your needs better. For a solution without CPAN, your function would look for the last spaces before your width, output that substring, and then work on the rest of the string.
The OS wouldn't make a difference, as long as you use a monospaced font. Otherwise, I'd preferredly output something like RTF (e.g. RTF::Writer), which can be shown/printed by even the older versions of Windows' text processors such as Write; or PDF, which you have heard of :-)
Update: I thought you'd run perl on the same system where you want the output - then you'd get the correct line endings by default (at least Strawberry does this for me).Perhaps the :crlf Layer from PerlIO might help... Looks like the easiest way for you is to use "\r\n" in place of pure "\n" - see the thread hinted to by FreeBeerReekingMonk. But if by "printing" (in the subject) mean "sending to paper", RTF (which is to TeX what PHP is to Perl) is better, because every Windows can print that "out of the box".
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: combining lists, formatting and printing on windows
by Aldebaran (Curate) on Apr 19, 2015 at 03:12 UTC | |
by Aldebaran (Curate) on Apr 20, 2015 at 06:00 UTC | |
by soonix (Chancellor) on Apr 20, 2015 at 11:47 UTC |