When you write a variable inside a bracket, it invokes a list context. This means that the material you want to assign to this variable will also be interpreted as a list.
. - , . , . , 1 , , 1 .
.
$1, $2, $3,... ( ).
:
$a =~ /(\d+)/;
$x = $1;
BTW: $a $b sort. , :).
($x) = $a =~ /(\d+)/;
# $x is the first element of the RegEx return value
# ($x, $y, $z) = $a =~ /(\d)(\d)(\d)/;
# $x = first match, $y = second and so on.
user1558455