programming-examples/perl/SystemFunction/stty cbreak _-dev-tty _&1.pl
2019-11-15 12:59:38 +01:00

9 lines
140 B
Perl

system "stty cbreak </dev/tty >&1";
print ">";
while (($char = getc) ne 'q') {
print "\n";
print "You typed $char\n>";
}