mfawbush has asked for the wisdom of the Perl Monks concerning the following question:
Hello, I've been beating on this for a while now that I'm just plumb confused now. I'm sure it's so simple and it's right in front of me. Need to send a five byte block to serial port. The snippet of code below works, however I need to replace all the values behind the hex escape "\x" with what the user puts in from STDIN strings. I've tried pack and hex with no success. Thank you in advance for your help.
#Works $port->write("\x01\x42\x62\x00\x01");
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: hex escape Question
by choroba (Cardinal) on Jul 28, 2015 at 17:39 UTC | |
by Monk::Thomas (Friar) on Jul 28, 2015 at 18:05 UTC | |
by mfawbush (Initiate) on Jul 28, 2015 at 18:31 UTC | |
by Monk::Thomas (Friar) on Jul 29, 2015 at 06:08 UTC | |
by mfawbush (Initiate) on Jul 29, 2015 at 02:35 UTC |