Sprad has asked for the wisdom of the Perl Monks concerning the following question:
The intent is to print every line entered at the console until a blank line is entered. But it doesn't work. If I put the line in a variable and then test it, it's fine, but I can't test directly against the <FOO> construct. Am I not supposed to do that?while (<STDIN> != "\n") { print; }
---
A fair fight is a sign of poor planning.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Testing filehandles
by jweed (Chaplain) on Jan 03, 2004 at 20:36 UTC | |
by Anonymous Monk on Jan 03, 2004 at 22:49 UTC | |
|
Re: Testing filehandles
by Anonymous Monk on Jan 03, 2004 at 20:22 UTC | |
|
Re: Testing filehandles
by pg (Canon) on Jan 04, 2004 at 05:12 UTC | |
|
Re: Testing filehandles
by dominix (Deacon) on Jan 04, 2004 at 01:54 UTC | |
by jweed (Chaplain) on Jan 04, 2004 at 08:17 UTC | |
by dominix (Deacon) on Jan 04, 2004 at 11:38 UTC | |
by Anonymous Monk on Jan 04, 2004 at 21:55 UTC | |
|
Re: Testing filehandles
by nothingmuch (Priest) on Jan 04, 2004 at 10:15 UTC |