How to capture a regex match in one line

my ($match) = "some string" =~ /(some).*/;
print $match; # prints "some"
Written on May 17, 2018