I'm just starting to learn Perl and I couldn't figure how to do this.
I need to parse strings such as these from a text file..
~ # rf: 0x7E 0x23 0x21 0x20 0x7E
I just need the Hex values without the 0x put into an array so the line above should be
7E 23 21 20 7E.
I've tried doing something like @frame = split (/[^\d^A-F]+/, $_); but I end up with
something like this
0 7E 0 23 0 21 0 20 0 7E
How do I remove the leading zeroes??
😕
I need to parse strings such as these from a text file..
~ # rf: 0x7E 0x23 0x21 0x20 0x7E
I just need the Hex values without the 0x put into an array so the line above should be
7E 23 21 20 7E.
I've tried doing something like @frame = split (/[^\d^A-F]+/, $_); but I end up with
something like this
0 7E 0 23 0 21 0 20 0 7E
How do I remove the leading zeroes??
😕