Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: How do I strip lines prefixed by a

by runrig (Abbot)
on Oct 25, 2000 at 07:32 UTC ( [id://38281]=note: print w/replies, xml ) Need Help??


in reply to How do I strip lines prefixed by a "#"

Simplest is to:
while (<INFILE>) { next if /^#/; # or next if substr($_,0,1) eq '#'; $content .= $_; };

Replies are listed 'Best First'.
RE: Answer: How do I strip lines prefixed by a
by Coplan (Pilgrim) on Oct 25, 2000 at 07:37 UTC
    Ok....that works great!

    But I am (unfortunately) a beginner Perl Hacker. So could you (or someone) please explain what exactly you did?

    I think it's the ^ that confuses me a bit.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (5)
As of 2024-04-23 23:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found