Re: Skipping blank lines while reading a flat file.

2005-10-07 Thread Jeff 'japhy' Pinyan
On Oct 7, Dave Thacker said: Given this test file. --start- this is my file end-- I want to skip the blank lines and just print the lines with text, like this When you say "blank", do you mean lines with NO characters at all (other than the ending newline) or lin

RE: Skipping blank lines while reading a flat file.

2005-10-07 Thread Ron Goral
> -Original Message- > From: Dave Thacker [mailto:[EMAIL PROTECTED] > Sent: Friday, October 07, 2005 07:05 > To: beginners@perl.org > Subject: Skipping blank lines while reading a flat file. > > > Perl 5.6 on linux > > Given this test file. > --start- > this > > is > > m

Re: Skipping blank lines while reading a flat file.

2005-10-07 Thread John W. Krahn
Dave Thacker wrote: > Perl 5.6 on linux > > Given this test file. > --start- > this > > is > > my file > end-- > I want to skip the blank lines and just print the lines with text, like this > this > is > myfile > > This is my test case code. > #!/usr/bin/perl -w >

Re: Skipping blank lines while reading a flat file.

2005-10-07 Thread Alois Heuboeck
Dave, (this is one I know :-) ) I want to skip the blank lines and just print the lines with text, like this this is myfile This is my test case code. #!/usr/bin/perl -w use strict; my $opt_testfile="test-text.txt"; open (TS, $opt_testfile) or die "can't open file"; while () { chomp;