in reply to re-opening DATA, printing any character

printf("%o",ord($char));
ord returns the ascii value of the given character, and %o is print in octal.

I'll come back to the other one in a bit.

/\/\averick