use strict; use warnings; use feature qw/ say /; my $x = '1 2 3 4 5 6 7 8 9 10 11 12 13 14 15'; say $x; my @matches = ( $x =~ m/\d+/g ); say for @matches; __END__