Your skill will accomplish what the force of many cannot |
|
PerlMonks |
Pulling bytes out of stringby mike65535 (Novice) |
on Oct 21, 2015 at 19:06 UTC ( [id://1145582]=perlquestion: print w/replies, xml ) | Need Help?? |
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.
Back to
Seekers of Perl Wisdom
|
|