#!/perl/bin/perl -w use strict; $SIG{'INT'} = 'cleanup'; while (1) { print "."; sleep 10; } sub cleanup {die "\nending\n";}