How do I take a string in Perl and split it up into an array with entries two characters long each?
I attempted this:
@array = split(/../, $string);
but did not get the expected results.
Ultimately I want to turn something like this
F53CBBA476
in to an array containing
F5 3C BB A4 76
The pattern-matching operator behaves in a special way in a list context in Perl. It processes the operation iteratively, matching the pattern against the remainder of the text after the previous match. Then the list is formed from all the text that matched during each application of the pattern-matching.