in reply to Is the signal handler supposed to work like this?

All I wanted to do was this, and be able to type ctrl-D to signify that I was done:
my @lines = <STDIN>;
(Somebody let me know if I missed the obvious boat here; I couldn't find the way to do this.)

I read somewhere that Ctrl-D is Ctrl-Z on Windows, but I cannot confirm that. Maybe this is the reason that it did not work for you?

Replies are listed 'Best First'.
Re^2: Is the signal handler supposed to work like this?
by AnomalousMonk (Archbishop) on Aug 30, 2008 at 03:04 UTC
    Ctrl-Z works as you suggest in the code above, but it must be the first character on a line and must be followed by a newline (although other characters may intervene between the Ctrl-Z and the newline). A Ctrl-Z that is not the first character on a line shows up as a teeny, right-pointing arrow.