{ my $input = ''; while( $input ne 'c' && $input ne 'C' ) { print "Press C to continue\n"; $input = ; chomp $input; } } print "It worked, of course.\n"; #### use IO::Prompt::Hooked; my $input = prompt( message => 'Press c to continue.', validate => qr/^c$/i, ); print "It worked, of course.\n"; #### use IO::Prompt::Hooked; prompt( message => 'Press c to continue.', validate => qr/^c$/i, ); print "If we're here, we know it worked.\n";