in reply to windows keyboard input
If a program is running and reading from stdin, then pressing ^Z on Win32 (or ^D on Unix) will make the program see EOF on that file handle.
So if you wrote:
then typed a bunch of stuff, ^Z would terminate the array-read and let the program go on. E.g.@a= <>;
Running it,@a= <>; foreach (@a) { $total += $_; ++$count; } print "total of $count items is $total\n";
1 2 5 6 ^Z total of 4 items is 14
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: windows keyboard input
by binary* (Novice) on Oct 06, 2001 at 02:32 UTC | |
by John M. Dlugosz (Monsignor) on Oct 06, 2001 at 02:40 UTC | |
by binary* (Novice) on Oct 06, 2001 at 03:06 UTC | |
by John M. Dlugosz (Monsignor) on Oct 06, 2001 at 09:12 UTC |