in reply to $/ question

You can use sysread to read on character at a time.
while(sysread FILENAME,$char,1){ # ^ # length # Do something with $char }