On Wed, 06 Dec 2017 21:53:37 -0600
"Martin McCormick" <marti...@suddenlink.net> wrote:

> A perl program needs to send binary data to an external device
> such that 0xff looks like 11111111
> 
>       I have a line in the program as follows:
> 
> my $txstart = pack("h*","fefe5a95");
> 
> Are those 4 bytes usable as the binary data 
> 
> fe fe 5a 95?
> 
>       Is there a good way when running perl -d to view the
> contents of the string to make sure it is what it should be?
> 

Yes, see the "x" command
( http://perl-begin.org/tutorials/perl-for-newbies/part2/#page--debugger--DIR ),
https://metacpan.org/pod/Data::Dumper , https://metacpan.org/pod/DDP , and some
debugger GUIs such as https://en.wikipedia.org/wiki/Data_Display_Debugger .

Regards,

        Shlomi

> Thank you.
> 
> Martin McCormick
> 



-- 
-----------------------------------------------------------------
Shlomi Fish       http://www.shlomifish.org/
http://www.shlomifish.org/humour/ways_to_do_it.html

Open source software: each person contributes a brick, but ultimately each
person receives a house in return.
    — Brendan Scott (Attributed)

Please reply to list if it's a mailing list post - http://shlom.in/reply .

--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to