I don't get that warning on linux, so can't test, but the problem seems to be that the chomp is executed even after you pressed ctrl-C. Did you try to move the chomp on a line by itself or add a noop inbetween so that there is another statement to break on?
my $choice = <>; chomp($choice); #or even my $choice = <>; $choice=$choice; chomp($choice);
In reply to Re: Handle Ctrl-C on Windows
by jethro
in thread Handle Ctrl-C on Windows
by cztmonk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |