use 5.028; # Turn all buffering off. select((select(STDOUT), $| = 1)[0]); select((select(STDERR), $| = 1)[0]); select((select(STDIN), $| = 1)[0]); print "Give me a cookie: "; my $thing = readline(STDIN); $thing =~ /^(a )?cookie$/ or die "That was no cookie.\n"; say "Thanks and goodbye!";