Perl can do direct reading and writing of bytes via the sysread and syswrite calls.
Given the narrow scope of this introduction to Perl, I will not discuss these functions. The references at the end provide complete information.