Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: fixing paragraphs

by mda2 (Hermit)
on Jun 17, 2005 at 18:57 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://467845]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (6)
As of 2024-04-18 15:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found