in reply to CLI Interactivity - Timed Prompt

Use Term::ReadKey.
The ReadKey function allows yout to specify a timeout. example (untested):
print "X done. Y starting in 15 seconds. Press any key to do Z instead +.\n"; my $selection=ReadKey(15); if ($selection) { # Key pressed. Do Z. } else { # No key pressed. Do Y. }
Could easily be altered to use ReadKey(1) and print the prompt every second.