Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
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 browsing the Monastery: (16)
As of 2015-07-30 16:41 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 (273 votes), past polls