#!/usr/bin/perl # just changing the shebang line to use perl 5.10.0 causes # it to seg fault when interrupted with Ctrl + C use strict; use warnings; $SIG{INT}=\&clean; sub clean { print 'caught'; } sleep 10;