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

Re: regular expression: match multiple newlines

by Lennotoecom (Pilgrim)
on Nov 04, 2013 at 01:22 UTC ( #1061088=note: print w/replies, xml ) Need Help??


in reply to regular expression: match multiple newlines

/(?<=\S)\s*$/ ? ({print "$a$`"},$a="\n") : ($a='EEEEE') while <DATA>; __DATA__ dogs rats cats fish text cats2 fish2 text3
output:
dogs rats catsEEEEEfish text cats2EEEEEfish2 text3

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1061088]
help
Chatterbox?
[choroba]: Progress! Nowadays, you can write a Perl script to generate such an anagram!
[GotToBTru]: i like to order my chemicals a-la-carte ambrus ;)
[thepkd]: Hi, in trying to create an Array of Hash of Array of Hash. You read it right. Is it possible to dereference it without using temps?
[GotToBTru]: what are temps?

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (11)
As of 2016-12-06 13:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (104 votes). Check out past polls.