"... concise solution..."
Consider this TMTOWTDI:
#!/usr/bin/env perl use strict; use warnings; use Path::Iterator::Rule; use Data::Dump; use feature qw (say); my $rule = Path::Iterator::Rule->new; $rule->or( $rule->new->name("*.pdf"), $rule->new->name("*.docx") ); my @matches = $rule->all(q(.)); dd \@matches; say scalar @matches; __END__
N.B.: Written in a hurry and not thoroughly tested, but it should work.
Regards, Karl
«The Crux of the Biscuit is the Apostrophe»
perl -MCrypt::CBC -E 'say Crypt::CBC->new(-key=>'kgb',-cipher=>"Blowfish")->decrypt_hex($ENV{KARL});'Help
In reply to Re: Grep match alternative
by karlgoethebier
in thread Grep match alternative
by IB2017
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |