#!/usr/bin/perl use Term::ReadLine; use sigtrap 'handler' => \&myhand, 'INT'; sub myhand { print "\n caught $SIG{INT}",@_,"\n"; } my $term = Term::ReadLine->new('test'); print $term->ReadLine()."\n"; $term->readline("try CTRL-C in some text here :");