in reply to Re: seperating a string with substr...
in thread seperating a string with substr...

If $data may contain newlines, you'd want instead:
my @pieces = $data =~ /.{1,8}/gs;
(Also note that your () were unnecessary, since list context //g will return the entire match if there are no submatches.)