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

Re: Massaging the Dictionary

by moritz (Cardinal)
on Aug 14, 2007 at 14:06 UTC ( #632499=note: print w/replies, xml ) Need Help??


in reply to Massaging the Dictionary

If you want to insert the br-Tags, use this one:

$ perl -wle '$_="a\nbc\nd";s{$}{<br />}gm; print' a<br /> bc<br /> d<br />

This is your regex but without the additional \n.

If you want to replace the line endings, use s{\n}{<br />}gm

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (10)
As of 2018-11-21 11:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My code is most likely broken because:
















    Results (239 votes). Check out past polls.

    Notices?