Use grep
use strict; use warnings; my @array = qw(KL1_something.txt KL12_anything.dat KL123_rest.txt); my @file = grep /^KL\d{1,2}_/, @array; print "@file\n";
In reply to Re: quantifiers with digits (\d{1|2} doesn't do what I expect)
by BillKSmith
in thread quantifiers with digits (\d{1|2} doesn't do what I expect)
by efoss
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |