Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: regexp word break help

by stephen (Priest)
on Apr 30, 2002 at 21:04 UTC ( #163156=note: print w/ replies, xml ) Need Help??


in reply to regexp word break help

Does it have to be a regexp? Why?

use Text::Wrap qw(wrap $columns); $columns = 45; my @lines = wrap('', '', 'Make sure this string is 45 chars or less, a +nd if you have to truncate it to make it shorter, only break it betwe +en a word (\s)'); print @lines;

stephen


Comment on Re: regexp word break help
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (12)
As of 2015-01-27 17:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My top resolution in 2015 is:

















    Results (201 votes), past polls