Catch ctrl-c

Author: stmuk

Catch ctrl-c to ignore or execute code

Source code: 16-18-catch-control-c.p6

use v6;

signal(SIGINT).tap();
#signal(SIGINT).tap( { say "caught" } );
my $name = prompt "what's your name?";
dd $name;