##
local $SIG{ALRM} = sub { kill HUP => $pid; die "No data\n" };
####
local $SIG{ALRM} = sub { alarm 0; print "No data\n"; alarm $timeout };
####
With newline
With newline
No data
No data
No data
NO newlineWith newline
With newline
With newline
No data
No data
No data
NO newlineWith newline
With newline
With newline
No data
No data
No data
NO newlineWith newline