Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

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

Hi,

Assuming that you are going to read a file,

$/="\n\n";

Regards,
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?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://870006]
help
Chatterbox?
[choroba]: I'm curious which part of your signature do they find offensive.
[LanX]: they?
[LanX]: click!
[choroba]: they
[LanX]: why do you think it's more than one person?
[Your Mother]: Because we are LEGION! Fix YOUR SIG SIG BLOCK!!!!
[Your Mother]: Forgot to sign in as my sockpuppet, how embarrassing!
[1nickt]: pryrt I am creating a Type to check valid user IDs, which must be a whole number greater than or equal to zero. I would like to disallow 1.0 but because of this behaviour, by the time it is checked by the constraint, it *is* an Int.
[LanX]: should this be considered? Re: Parsing .txt into arrays
[LanX]: and this Re^4: Hash user input

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (15)
As of 2017-05-24 20:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?