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

Re: how to skip certain lines and check for blank ones?

by mickeyn (Priest)
on Oct 31, 2006 at 07:30 UTC ( #581441=note: print w/ replies, xml ) Need Help??


in reply to how to skip certain lines and check for blank ones?

first of all, read perlre.

a code that may suit your purpose might be something like:

my $INFILE_file_name = 'your_file'; open my $INFILE, '<', $INFILE_file_name or die "$0 : failed to open input file $INFILE_file_name : $ +!\n"; while (<$INFILE>){ next if ( m{ \A \s* # }x); ... your code here ... } close $INFILE or warn "$0 : failed to close input file $INFILE_file_name : $ +!\n";

HTH,
Mickey


Comment on Re: how to skip certain lines and check for blank ones?
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (5)
As of 2014-09-01 19:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite cookbook is:










    Results (17 votes), past polls