The stupid question is the question not asked | |
PerlMonks |
Re^2: How to Format Serial Port Output Formatby user2829 (Acolyte) |
on Dec 09, 2010 at 17:39 UTC ( [id://876289]=note: print w/replies, xml ) | Need Help?? |
ok I guess pack function in perl works for me :)..
@input=(0x04,0x0e,0x04,0x01,0x03,0x0c,0x00);
$ascii = pack("C*", @input);
print "the value is $ascii";
$PortObj->write($ascii)|| die "Can't write to $PortName: $^E\n";;
Thanks,
-USER2829
In Section
Seekers of Perl Wisdom
|
|