"be consistent" | |
PerlMonks |
Re^2: Grep asterisk sign in input fileby Athanasius (Archbishop) |
on Jul 25, 2017 at 07:18 UTC ( [id://1195951]=note: print w/replies, xml ) | Need Help?? |
Hello choroba, Nice solution, especially the inclusion of last which avoids a potentially nasty bug. But as it stands, this code will match a filter value such as ac* with an input value such as zac1234 — which doesn’t appear to be what the OP wants. This is easily fixed by anchoring the filter regex to the beginning of the match:
Hope that helps,
In Section
Seekers of Perl Wisdom
|
|