in reply to read data 1 byte at a time


You can set $/ = \1 to read 1 byte at a time, see $/ in perlvar.
#!/usr/bin/perl -wl $/ = \1; open FILE, "file" or die "Error message here: $!"; while (<FILE>) { print; }

--
John.