use strict; use warnings; my $str = <<'HTML'; 63/1200 97/1200 61/1200 106/1200 HTML my @matches = $str =~ m!\d+/\d+!g; print join "\n", @matches; #### 63/1200 97/1200 61/1200 106/1200