Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Removing multiple trailing comment lines from a string

by kcott (Archbishop)
on Dec 23, 2016 at 17:19 UTC ( [id://1178440]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/env perl -l
    
    ...
        ; tab + trailing 2
     ; space + trailing 3
    ; trailing 4
    
  2. or download this
    $ pm_1178405_ini_file_clean.pl
    Contents of 'MySection':
    ...
    ; space+tab+comment+tab+space
    qwe=rty
    asd=fgh
    
  3. or download this
    $ cat -vet pm_1178405_ini_file_clean.pl
    ...
    ...
    ^I; tab + trailing 2$
     ; space + trailing 3$
    ; trailing 4$
    
  4. or download this
    $ pm_1178405_ini_file_clean.pl | cat -vet
    Contents of 'MySection':$
    ...
    ; space+tab+comment+tab+space$
    qwe=rty$
    asd=fgh$
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (9)
As of 2024-03-28 12:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found