use IO::Select;; IO::Select->new( STDOUT ) or die $^E;; @s = $s->can_read() or print "$^E";; An operation was attempted on something that is not a socket #### C:\test>p1 [0] Perl> $SIG{INT} = sub{ print "Got ^C" };; [0] Perl> Got ^C Got ^C ;; [0] Perl>