Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
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 perusing the Monastery: (11)
As of 2015-07-06 21:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (83 votes), past polls