my $string = '1 Cat 2 Dogs 3 Hamsters'; my @animals = split /(?=\d)/, $string;