in reply to Re: Removing blank lines from array
in thread Removing blank lines from array

I am intrigued greatly by jjohns solution to my problem but i dont't understand when he set up his while loop using
while(my $line = )
the loop has no condition, won't that give you an error

Jemts

"If you're traveling in a time machine, and you're eating corn on the cob, I don't think it's going to affect things one way or the other. But here's the point I'm trying to make: Corn on the cob is good, isn't it."

Replies are listed 'Best First'.
Re: Re: Re: Removing blank lines from array
by Sweeper (Pilgrim) on Feb 28, 2002 at 20:47 UTC
    I am intrigued greatly by jjohns solution to my problem but i dont't understand when he set up his while loop using
      while(my $line = )
    
    the loop has no condition, won't that give you an error

    I guess it was a typo. The proper line would read:

      while(my $line = <READ>)
    
    Maybe jjohn forgot to type the angle brackets as ampersand HTML entities (&lt; and &gt;), he just typed the single characters, and your HTML renderer has considered it was a tag, and an invalide one, and discarded it.
Re: Re: Re: Removing blank lines from array
by Aighearach (Initiate) on Mar 01, 2002 at 01:09 UTC
    He probably used <pre> instead of <code>...
    --
    Snazzy tagline here
      All true! I forgot about <code> and those durn HTML entities. In a few more years, I get the hang of this "web" thing I've heard so much about. :-D