Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
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 having an uproarious good time at the Monastery: (7)
As of 2014-10-25 15:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (145 votes), past polls