You just need parentheses around the LHS to force list context:
my ($val) = map { /^\*\s\(?([^\)]+)\)?/ ? $1 : () } @GET_STRING;
In reply to Re: Assign result of map to scalar variable
by rjt
in thread Assign result of map to scalar variable
by ram31
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |