in reply to Regexp to extract groups of numbers

Not the most elegant example, but haven't seen an answer using it yet:
my $var|= '000000000000022102840002210284'; my $length = 10; my @nums; push(@nums, substr($var, 0, $length, '')) for (1 .. length($var) / $le +ngth); print join("\t",@nums);
edited to put length in variable so that it's easier to change universally.