open BYTES, '<', 'bytesfile' or die $!; my $bytes = do{ local $/; }; # Slurp all 1600 bytes into a scalar. close BYTES; my( $first, $last, $other...) = unpack 'A9 A7 A5 ...', $bytes;