my $reload_config = 0; $SIG{USR1} = sub { $reload_config = 1 }; ... while( $yadda_yadda_yadda ) { check_something( $something ); poll_for_widgets( $mywidgets ); if( $reload_config ) { reload_my_config( $config ); $reload_config = 0; } } #### speed 38400 baud; rows 30; columns 80; line = 0; intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = ; eol2 = ; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W; ...