in reply to Assign result of map to scalar variable

Capturing parens return an array of the results, and you only have one set of capturing parens, so you can just return that:
my ($val) = map { /^\*\s\(?([^\)]+)\)?/} @GET_STRING; # Or (as others have suggested) my ($val) = map { /^\*\s\(?([^\)]+)\)?/ ? $1 : () } @GET_STRING;

Replies are listed 'Best First'.
Re^2: Assign result of map to scalar variable
by AnomalousMonk (Archbishop) on Jul 18, 2013 at 21:08 UTC
    my ($val) = map { /^\*\s\(?([^\)]+)\)?/} @GET_STRING;

    ++     Simplest by far... so far.