Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: fixing paragraphs

by mda2 (Hermit)
on Jun 17, 2005 at 18:57 UTC ( #467845=note: print w/replies, xml ) Need Help??


in reply to fixing paragraphs

You can use Text::Wrap to do it.

Sample:

$l = "sentence to format. This is a sample sentence to format. Thi +s is a sample sentence to format. This is a sample sentence to forma +t."; use Text::Wrap; $Text::Wrap::columns = 52; print wrap(" ", ' ', $l), "\n\n"; __END__ sentence to format. This is a sample sentence to format. This is a sample sentence to format. This is a sample sentence to format.

--
Marco Antonio
Rio-PM

Replies are listed 'Best First'.
Re^2: fixing paragraphs
by bfdi533 (Friar) on Jun 19, 2005 at 19:44 UTC

    That is not a bad idea and I will remember this for the future.

    But, the text for format is several long paragraphs where I just want to join the incomplete sentences together. I do not need to format or wrap the text as I am going to end up importing this into Latex/Lyx for formatting the final output.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (4)
As of 2019-12-13 04:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?