Problems? Is your data what you think it is? | |
PerlMonks |
Re: do $n exist in grep?by Marshall (Canon) |
on May 12, 2021 at 15:19 UTC ( [id://11132491]=note: print w/replies, xml ) | Need Help?? |
Grep could have been called "filter". But it is: "get regular expression". Use grep when you think about getting a subset of an array. Yes, in this case $1 will be either A or B if the regex is True. I can show that, but I don't want to confuse you. Here $1 is not relevant. Ok, on second thought, here we go...
In Section
Seekers of Perl Wisdom
|
|