Filter out small numbers
my @numbers = qw(8 2 5 3 1 7);
my @big_numbers = grep {$_ > 4} @numbers;
print "@big_numbers\n"; # (8, 5, 7)
Filter out the new files
my @files = glob "*.log";
my @old_files = grep { -M $_ > 365 } @files;
print join "\n", @old_files;
my @numbers = qw(8 2 5 3 1 7);
my @big_numbers = grep {$_ > 4} @numbers;
print "@big_numbers\n"; # (8, 5, 7)
Filter out the new files
my @files = glob "*.log";
my @old_files = grep { -M $_ > 365 } @files;
print join "\n", @old_files;
No comments:
Post a Comment