Some filehandles can be rewound with the
seek command (as
a general rule: standard-input can not be rewound, pipes generally
can not be rewound).
The
ord function returns the ASCII value of the first character
of the scalar passed to it, you can convert that to octal (or hexadecimal)
with
sprintf.