in reply to Calling a variable value as a variable

I haven't looked closely at your unpack().

This:

my ($blu, $red, $grn, $ylw) = (@bytes[0], @bytes[12], @bytes[56], @byt +es[120]);
may not be what you want.
my ($blu, $red, $grn, $ylw) = ($bytes[0], $bytes[12], $bytes[56], $byt +es[120]);
is the same. I'm not sure that is what you want either!
You are getting scalar values at particular byte offsets into the @byte array.