# Handle Ctrl-C $SIG{INT} = \&ctrlc; use autodie; use Modern::Perl; use Storable qw {store retrieve}; my $dbfile = 'sbs.db'; my %person = %{ retrieve($dbfile) }; while() { print "\n(C)reate,(L)ist,(N)ew,(M)odify,(R)emove,(Q)uit? "; chomp(my $choice = <>); $choice = lc $choice; # # Some code here # } exit; sub ctrlc { store \%person,$dbfile; print "You used Ctrl-C!"; exit 1; } #### (C)reate,(L)ist,(N)ew,(M)odify,(R)emove,(Q)uit? Use of uninitialized value $choice in chomp at J:\ps \monks.pl line 13. Use of uninitialized value $choice in lc at J:\ps\monks.pl line 14. You used Ctrl-C!