Avoid creating GV with NULL name when vivifying nameless scalars.
[p5sagit/p5-mst-13.2.git] / eg / van / vanexp
CommitLineData
378cc40b 1#!/usr/bin/perl
2
79072805 3# $RCSfile: vanexp,v $$Revision: 4.1 $$Date: 92/08/07 17:20:53 $
378cc40b 4
5# This is for running from a find at night to expire old .deleteds
6
7$can = $ARGV[0];
8
9exit 1 unless $can =~ /.deleted$/;
10
11($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime,
12 $blksize,$blocks) = stat($can);
13
14exit 0 unless $size;
15
16if (time - $mtime > 2 * 24 * 60 * 60) {
17 `/bin/rm -rf $can`;
18}
19else {
20 `find $can -ctime +2 -exec rm -f {} \;`;
21}