Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

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

by tye (Sage)
on Dec 23, 2016 at 05:01 UTC ( [id://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