programming-examples/perl/SystemFunction/stty cbreak _-dev-tty _&1.pl

9 lines
140 B
Perl
Raw Normal View History

2019-11-15 12:59:38 +01:00
system "stty cbreak </dev/tty >&1";
print ">";
while (($char = getc) ne 'q') {
print "\n";
print "You typed $char\n>";
}