>perl -wMstrict -le "my $s = 'a987b'; my $m = ($s =~ m/(\d{1,3})/); print qq{'$m'}; my ($d) = $s =~ m/(\d{1,3})/; print qq{'$d'}; " '1' '987'