http://qs321.pair.com?node_id=1145585


in reply to Pulling bytes out of string

One option is to use a regex to match just two chars at a time--globally--and place the results into an array:

use strict; use warnings; my $string = '8602353907455755'; my @arr = $string =~ /../g; print "@arr";

Output:

86 02 35 39 07 45 57 55

Hope this helps!