my $thing = '12340019'; my @num01 = map{ int } $thing =~ m/(\d{4})/g;