while(sysread FILENAME,$char,1){ # ^ # length # Do something with $char }