http://www.perlmonks.org?node_id=54413

leons has asked for the wisdom of the Perl Monks concerning the following question:

Dear Monks,

How can I easily split a certain string ... Let's say:
my $string='aabbccddee';

Into n-character parts, without using a regex. The only thing
I came up with was (assuming I'd want 2-character parts):
push @row,$& while('aabbccddee'=~/\w{2}/g);
Which would result in @row being:
@row=('aa','bb','cc','dd','ee');
Is there a better way ... i.e. by using split or map or whatever ?
Because I really don't want to use a regex or a while-loop

Thanks a Lot,

Bye, Leon