Good points - thanks for your feedback. > Anthony (Tony) Esposito > Senior Technical Consultant > Inovis(tm) > 2425 N. Central Expressway, Suite 900 > Richardson, TX 75080 > (972) 643-3115 > [EMAIL PROTECTED] >
-----Original Message----- From: Wagner, David --- Senior Programmer Analyst --- WGO [mailto:[EMAIL PROTECTED] Sent: Thursday, July 17, 2003 11:32 AM To: Tony Esposito; [EMAIL PROTECTED] Subject: RE: trying to delete a file if >= 1 day old Tony Esposito wrote: > Fellow Perl neophytes ( and non-neophytes), > I need a little clarification. I am trying to remove files that are > greater that 24 hours old. The code snippet below is in a 'while' > loop that steps through a directory, yet it seems not to work - no > files are removed no matter what their 'age' ( i.e., their creation > time ). I have stepped through the code via the Perl debugger and > know the code is being executed. > > unlink $file unless -C $file < 1; -C is not for creation, but for inode-change time use -M which is last file modification time. If you use as a daemon, then you will need set $^T otherwise this is set to the startup of the script. Happened to me and couldn't understand why nothing we ever deleted. Wags ;) > >> Anthony (Tony) Esposito >> Senior Technical Consultant >> Inovis(tm) >> 2425 N. Central Expressway, Suite 900 >> Richardson, TX 75080 >> (972) 643-3115 >> [EMAIL PROTECTED] ********************************************************** This message contains information that is confidential and proprietary to FedEx Freight or its affiliates. It is intended only for the recipient named and for the express purpose(s) described therein. Any other use is prohibited. **************************************************************** -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]