#!/usr/bin/perl use warnings; use strict; use Term::ReadKey; ReadMode 4; warn "Warning message!"; print "Press ENTER"; while (1) { my $key = ReadKey(-1); unless(defined $key) {$key = "";} if ($key eq "\n") { last; } } ReadMode 0;