in reply to vec and unpack

split (//, unpack("b*", $OutputBuffer)) what it does
From the vec documentation

To transform a bit vector into a string or list of 0's and 1's, use
$bits = unpack("b*", $vector);
@bits = split(//, unpack("b*", $vector));


We cannot print vector variables directly.
In sockets program which uses select will use vec to set a bit.
So if you want to print the bits we cannot print it directly.
For that purpose we will use the unpack.