oshalla and eight-one gave good descriptions of the grep block
The code almost works. Here are a couple of mods to make things work
Here is the modified code
#! /usr/local/bin/perl use strict; use warnings; use diagnostics; die unless chdir "/path/directory"; die unless opendir DIR, '.'; foreach my $file (grep {-f && (14 < -M)} readdir DIR) { # print $file,"\n"; rename $file, ".$file"; # system("mv", $file, ".$file"); } closedir DIR;
In reply to Re: Hide my ageing work
by periapt
in thread Hide my ageing work
by blowupp
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |