in reply to Assign result of map to scalar variable
my $VAL = (grep { defined } map { /^\*\s\(?([^\)]+)\)?/ ? $1 : () } @G +ET_STRING)[0];
Consider using grep instead of map.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Assign result of map to scalar variable
by AnomalousMonk (Archbishop) on Jul 18, 2013 at 20:13 UTC | |
|
Re^2: Assign result of map to scalar variable
by hdb (Monsignor) on Jul 18, 2013 at 20:45 UTC | |
by AnomalousMonk (Archbishop) on Jul 18, 2013 at 20:56 UTC |