Is $1 captured somewhere? It would be nice if $1 became an arrayref in this case?grep /^..(A|B)./,@a;
BTW it seems inconsistent that the parens in this statement might be moot. Seems odd to have syntax there that is meaningless in this context. If $1 was returned as an arrayref, it would make good sense, vis-a-vis over-loading et all?
In reply to do $n exist in grep? by misterperl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |