DOKK / manpages / debian 12 / libcatmandu-perl / Catmandu::Fix::filter.3pm.en
Catmandu::Fix::filter(3pm) User Contributed Perl Documentation Catmandu::Fix::filter(3pm)

Catmandu::Fix::filter - Filter values out of an array based on a regular expression

   # words => ["Patrick","Nicolas","Paul","Frank"]
   filter(words,'Pa')
   # words => ["Patrick","Paul"]
   
   # filter only values that do NOT match the pattern:
   filter(words, 'Pa', invert: 1)
   # words => ["Nicolas","Frank"]

Catmandu::Fix

2023-03-03 perl v5.36.0