请教pcap模块sendpacke函数问题

请教pcap模块sendpacke函数问题

请教pcap模块sendpacke函数问题
函数定义如下:
Net::Pcap::sendpacket($pcap_t, $packet)

Send a raw packet to the network. $pcap_t is the interface that will be used to send the packet, $packet contains the data of the packet to send (including the various protocol headers). The MAC CRC doesn't need to be included, because it is transparently calculated and added by the network interface driver. The return value is 0 if the packet is succesfully sent, -1 otherwise.
我输入buf中为1,但是捕获到的报文实际为31,也就是1的ascii码,怎么解决阿~~~
到处都找不到相应的说明
自己解决了呵呵,perl才上手不知道pack的用法呵呵,
my $packet = pack "C6C6", 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2;
fix it