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
F53CBBA476into and array containing
F5 3C BB A4 76
@array = ( $string =~ m/../g );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.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?"

1 comments:
Perl is the best scripting language for Text processing and handle regex. I have posted few articles related to those at my blog
http://icfun.blogspot.com/search/label/perl
Also Perl's Cpan has lots of support that I don't even need to think extra while developing project. I didn't find such help on other programming language except Java and .NET
Post a Comment