Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: Removing multiple trailing comment lines from a string

by Laurent_R (Canon)
on Dec 23, 2016 at 07:28 UTC ( [id://1178413]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
       $s =~ s/^[ \t]+//mg;    # remove leading  whitespace from each line
       $s =~ s/^\s+//;         # remove leading  whitespace
    
  2. or download this
    $s =~ s/^;.*\Z//m; chomp $s;
    $s =~ s/^;.*\Z//m; chomp $s;
    $s =~ s/^;.*\Z//m; chomp $s;
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (3)
As of 2024-03-29 15:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found