use IO::Prompt::Hooked; prompt( message => 'Press c to continue.', validate => qr/^c$/i, ); print "If we're here, we know it worked.\n";