use 5.010; $SIG{INT} = 'IGNORE'; my $x = 1; while ( $x <= 5 ) { say $x++; sleep 1; }