Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: regexp word break help

by stephen (Priest)
on Apr 30, 2002 at 21:04 UTC ( [id://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

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (5)
As of 2024-03-29 10:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found