use Carp; $SIG{INT} = sub { croak shift }; while(1) { sleep 1; }