Endless Loop

From: Bolcato Chris (esm1cmb_at_ups.com)
Date: 07/29/04


To: beginners@perl.org
Date: Thu, 29 Jul 2004 10:23:53 -0400

This may be a dumb question, but why will this loop not end when nothing is
entered in STDIN?

        print "Enter Things:\n";
        while (<STDIN>) {
                print "I saw $_";
        }
        print "The End\n";

If nothing is entered the loop continues.
Output:
        I saw red
        I saw yellow
        I saw
        I saw
        I saw