Beefy Boxes and Bandwidth Generously Provided by pair Networks RobOMonk
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Answer: How do I strip lines prefixed by a

( #38287=categorized answer: print w/ replies, xml ) Need Help??

Q&A > regular expressions > How do I strip lines prefixed by a "#" contributed by runrig

Another option:
my $infile = "template.dsc"; open (INFILE, "$infile") || die "Broken: $!"; my $content; read INFILE, $content, -s INFILE; $content =~ s/^#.*//m; close INFILE; ...

Comment on Answer: How do I strip lines prefixed by a
Download Code
RE: Answer: How do I strip lines prefixed by a
by runrig (Abbot) on Oct 25, 2000 at 07:56 UTC
    correction: make that s/...//gm; oops! forgot the 'g' :-)
Log In?
Username:
Password:

What's my password?
Create A New User
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (8)
As of 2014-04-20 04:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (485 votes), past polls