if ($ident == $Idents{ Rotation_Marker }) { @packet{ @rotation_packet_fields } = unpack ( $packet_template{ $ident }, $buffer); ... if ($ident == $Idents{ Format_7 }) { @packet{ @packet_fields } = unpack ( $packet_template{ $ident }, $buffer);