in reply to my $x or my ($x)
perl -e 'my $x = "abcdefg" =~ /(cd)/; print "$x\n";'
whereas matching in list context assigns the captures in the match
perl -e 'my ($x) = "abcdefg" =~ /(cd)/; print "$x\n";'
Normally, or rather probably, you would be making more than one capture in the regular expression so you would do something like
my($this, $that) = $string =~ /abc(def).+?(pq)$/;