Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Removing multiple trailing comment lines from a string (\n)

by tye (Sage)
on Dec 23, 2016 at 05:01 UTC ( #1178408=note: print w/replies, xml ) Need Help??


in reply to Removing multiple trailing comment lines from a string

$s =~ s/\n;.*\Z// for 1..3;

- tye        

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (3)
As of 2020-09-27 12:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    If at first I donít succeed, I Ö










    Results (142 votes). Check out past polls.

    Notices?