This was my answer:
How do I take a string in Perl and split it up into an array with entries two characters long each?
Ultimately I want to turn something like this
into and 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.
@array = ( $string =~ m/../g );
I'm posting to my blog the questions I've answered on StackOverflow, which earned the "Good Answer" badge. This was my answer to "How can I split a string into chunks of two characters each in Perl?"