#! perl -slw use strict; $SIG{ INT } = sub { print 'SIGINT called'; $ENV{ fred } = 12345; return; }; $ENV{ fred } = 0; while( sleep 1 ) { print $ENV{ fred }; } __END__ C:\test>junk10 0 0 0 0 0 0 SIGINT called 12345 12345 12345 12345 12345 12345 12345 Terminating on signal SIGBREAK(21)