P
perlUSER
Hello;
I am trying to select files based on the pattern and can't get the
script to work on one of the pattern. Code snippet:
my @list = glob('*');
@list = grep {m[^EOM_[A-Z][a-z]{2}_\d{4}]} @list;
foreach my $list (@list){
print $list."\n";
}
The above code return all files matching the pattern. Ex: EOM_Jan_2006,
EOM_Feb_2006.
my @list = glob('*');
@list = grep {! m[^\d{2}_d{2}_d{2}]} @list;
foreach my $list (@list){
print $list."\n";
}
I am expecting to see files like these 06_04_01, 06_04_02 thru
06_04_28.
Please help me with this issue.
Thanks in advance.
I am trying to select files based on the pattern and can't get the
script to work on one of the pattern. Code snippet:
my @list = glob('*');
@list = grep {m[^EOM_[A-Z][a-z]{2}_\d{4}]} @list;
foreach my $list (@list){
print $list."\n";
}
The above code return all files matching the pattern. Ex: EOM_Jan_2006,
EOM_Feb_2006.
my @list = glob('*');
@list = grep {! m[^\d{2}_d{2}_d{2}]} @list;
foreach my $list (@list){
print $list."\n";
}
I am expecting to see files like these 06_04_01, 06_04_02 thru
06_04_28.
Please help me with this issue.
Thanks in advance.