http://qs1969.pair.com?node_id=427090


in reply to Re: What makes IO::Select::can_read return?
in thread What makes IO::Select::can_read return?

Run the program below and do a kill -USR1, to see it in action.
#!/usr/bin/perl -w use IO::Select; my $sel = new IO::Select (\*STDIN); $SIG{USR1} = sub { print "signal\n"}; if (my @socks = $sel->can_read(50)) { warn "Got Here\n"; } else { warn "Else: $!\n"; }


-- All code is 100% tested and functional unless otherwise noted.