A one-liner: Why doesn't alarm interrupt <> ?

D

David Morel

Hi all,

Why doesn't the following program terminate?

alarm 1;
<STDIN>;

It seems that alarm does not interrupt the <> operator. Why not? And
more importantly, is there any way to interrupt the general <handle>?
Surely there must be a way... thanks in advance,

David Morel

p.s.
I am running Perl on Windows
 
S

Sam Holden

Hi all,

Why doesn't the following program terminate?

It works fine for me... Under linux and Solaris.
alarm 1;
<STDIN>;

It seems that alarm does not interrupt the <> operator. Why not? And
more importantly, is there any way to interrupt the general <handle>?
Surely there must be a way... thanks in advance,

David Morel

p.s.
I am running Perl on Windows

perldoc perlport says:

alarm SECONDS
alarm Not implemented. (Win32)

In my docs. Which would probably cause it not to work.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,233
Members
46,820
Latest member
GilbertoA5

Latest Threads

Top