Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Skip 2 new lines

by CountZero (Bishop)
on Nov 08, 2010 at 07:37 UTC ( #870052=note: print w/replies, xml ) Need Help??


in reply to Skip 2 new lines

A 100% regex-free solution:
use strict; use warnings; use 5.012; while (<DATA>) { chomp; print "$_ "; say unless $_; } __DATA__ this is a line which is part of a sentence. And this is the second sentence in the target paragraph. This should be the start of a new paragraph ....
Output:
this is a line which is part of a sentence. And this is the second sen +tence in the target paragraph. This should be the start of a new paragraph ....

CountZero

A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (4)
As of 2022-01-27 11:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:












    Results (70 votes). Check out past polls.

    Notices?