in reply to Regex to extract digits

Okay, the part that is your 'landmark' is the '-'. So you put that in the RE to recognize, but not to 'capture'. You do want to capture the digits, so you use the '\d' (shorthand for [0-9]) to recognize the digits, and surround those with capturing parentheses. So the RE would look like "/-(\d\d)/". But then you want to _use_ it as you said, to get the value, so ...
my $thing = '1232-32'; my $value; if( $thing =~ m/-(\d\d)/ ) { $value = $1; printf "I found '%s'\n", $value; } else { printf "I didn't find what I was expecting in '%s'\n", $thing; }
But that would scare many of us because it doesn't check whether there might be more or less than two digits, or whether there are strange characters following the digits, and other such errors. So for the string you showed us, we'd probably feel like saying something like
if( $thing =~ m/^\d+-(\d+)$/ ) {
but that might be too much checking for your purposes.