Use of uninitialized value in concatenation (.) or string at noname1.pl line 23.
####
use strict;
use warnings;
my $test = 'abc , def';
$test =~ /([\s\w]+),([\s\w]+)/;
for ($1, $2) {
my $string = $_;
$string =~ s/\s+\z//ms;
print "$string\n";
}
####
abc