On Thu, 2003-07-10 at 17:30, Michael Weber wrote:
> Here's the basic frame of code I'm using:
> 
> #!/usr/bin/perl -w
> 
> use strict;
> 
> my $line;
> 
> while(1) {
>         $line = <STDIN>;
>             # Highlighting code goes here...
>         print $line;
> }
> 

I would suggest using the following:

while($line = <STDIN>) {
        # Highlighting code goes here...
        print $line;
}

This way it sets $line each iteration through the loop and when there is
no more <STDIN> to process it breaks the while and exits.

Tim.



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to