mike65535 has asked for the wisdom of the Perl Monks concerning the following question:
I have a series of strings made up of two-byte data - (typical of CommPort communication: Command Word, length, text, "hex" values) Like this: 8602353907455755 ... I want to pull out the '86' and the '02' and the '35', etc., and put them into an array of bytes or something similar.
I've looked at "split". It seems to revolve around the use of Regular Expressions (of which I know less than I know about Perl) to determine delimiters (which I don't have).
Is there a function or operator within Perl that I can wrangle to perform the task?
Thanks.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Pulling bytes out of string
by Kenosis (Priest) on Oct 21, 2015 at 19:35 UTC | |
Re: Pulling bytes out of string
by AnomalousMonk (Archbishop) on Oct 22, 2015 at 00:27 UTC | |
Re: Pulling bytes out of string
by toolic (Bishop) on Oct 21, 2015 at 19:08 UTC | |
by locked_user sundialsvc4 (Abbot) on Oct 21, 2015 at 21:06 UTC | |
by AnomalousMonk (Archbishop) on Oct 22, 2015 at 00:22 UTC | |
Re: Pulling bytes out of string
by AnomalousMonk (Archbishop) on Oct 22, 2015 at 00:36 UTC | |
by mike65535 (Novice) on Oct 22, 2015 at 12:43 UTC |