source:
trunk/essentials/dev-lang/perl/h2pl/tcbreak2
| Last change on this file was 3181, checked in by , 19 years ago | |
|---|---|
| File size: 180 bytes | |
| Line | |
|---|---|
| 1 | #!/usr/bin/perl |
| 2 | |
| 3 | require 'cbreak2.pl'; |
| 4 | |
| 5 | &cbreak; |
| 6 | |
| 7 | $| = 1; |
| 8 | |
| 9 | print "gimme a char: "; |
| 10 | |
| 11 | $c = getc; |
| 12 | |
| 13 | print "$c\n"; |
| 14 | |
| 15 | printf "you gave me `%s', which is 0x%02x\n", $c, ord($c); |
| 16 | |
| 17 | &cooked; |
Note:
See TracBrowser
for help on using the repository browser.
