getc is supposed to return a char. I find that it doesn't return the correct value for non-printable characters. For example:
open(FILE, $ARGV[$1]) || die("can't open: $!");
$namlen=getc(FILE);
$len=read(FILE,$fname,$namlen);
The first byte contains the length of the string that...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.