$SIG{INT} = sub { done("Ouch!") }; sub done { print "@_\n\n"; exit; }