Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw

Re: Skip 2 new lines

by murugu (Curate)
on Nov 08, 2010 at 02:20 UTC ( #870006=note: print w/replies, xml ) Need Help??

in reply to Skip 2 new lines


Assuming that you are going to read a file,


Murugesan Kandasamy
use perl for(;;);

Replies are listed 'Best First'.
Re^2: Skip 2 new lines
by Anonymous Monk on Nov 08, 2010 at 02:42 UTC

    Hi Murugu,

    Thanks for the feedback. This didn't quite do what I was hoping... :)

    In my file I have '2' paragraphs that I would like to create, but each section of text that I want to make a paragraph out of has a newline every 4th word - the only thing that separates each 'section'/'to be paragraph' is 2 newlines that I would like to have maintained in the newly created file.

    Right now my code just makes one paragraph out of the 2 sections.

    Thanks again.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://870006]
[erix]: I would have thought that alignment is an important optimizing consideration for most (large) software -- I know it is for postgres...
[marto]: "left a bit... left a bit.... left a bit.... too far :("
[erix]: and whence the Host in "Host C" Corion?

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (4)
As of 2017-04-25 09:53 GMT
Find Nodes?
    Voting Booth?
    I'm a fool:

    Results (449 votes). Check out past polls.