Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Re: Re: Line size in a text widget

by chanio (Priest)
on Mar 10, 2004 at 14:41 UTC ( #335456=note: print w/ replies, xml ) Need Help??


in reply to Re: Re: Line size in a text widget
in thread Line size in a text widget

not tested, just an idea...

use Text::Autoformat; my ($allTheText) = shift; ## all your text to format my (@lins); ## your resulting lines my ($widthTxt) = 30; ## your line width... { my ($formated)=autoformat($allTheText, { left=>5, right=>$widthTxt +, all=>1}) if ($allTheText); foreach (split(/\n+/,$formated)) { push(@lins,$_); ## array w/lines of max.30chrs.wth. } }


Comment on Re: Re: Re: Line size in a text widget
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://335456]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (6)
As of 2014-07-13 19:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (251 votes), past polls