my $thing = '12340019'; my @splat = $thing =~ m/\d{4}/g; print Dumper \@splat; __END__ $VAR1 = [ '1234', '0019' ];