If you are sure that your input will always be integers, you could use
my $thing = '12340019';
my @num01 = map{ int } $thing =~ m/(\d{4})/g;
PJ
We are drowning in information and starving for knowledge - Rutherford D. Rogers
What good is knowledge if you have to pull teeth to get it - anonymous