In that example, $last_char_digit will capture the truth value of the match (generally 1, irrespective of what the digit actually matched is). But $1, for example, will indeed contain the matched value given that \d is the first bracketed expression in this example regex. update: my ( $x ) vs my $x - ouch!