You are using the wrong tool for breaking up fixed width fields.
$s = '000000000000022102840002210284'; print unpack '(a10)*', $s; 0000000000 0002210284 0002210284
If there is any doubt that the data will only contain digits, verify that with $s =~ m[^\d+$]; first.
In reply to Re: Regexp to extract groups of numbers
by BrowserUk
in thread Regexp to extract groups of numbers
by neilh
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |