neilwatson has asked for the wisdom of the Perl Monks concerning the following question:
I'm beginning to write a script to find older files and email the owners asking them to clean them up. Consider this snipped:
#using File::Find sub wanted{ #checks for old files if (-r && -f){ #get size of file (MB) $size=int((lstat($_))[7]/1000000); # check the age of file if ($opt{a} < -A && $size > $opt{s}){ #get user id $uid = (lstat($_))[4];
So now I have the uid, file name, file size and the file age. How do I store it? My though was to create a hash whose name is the uid. The keys (name, size, age) would reference an array for file name, size and age. Now I have these questions:
Thanks for your time.
Neil Watson
watson-wilson.ca
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Help with complex data structures
by mirod (Canon) on Nov 14, 2002 at 15:15 UTC | |
by tommyw (Hermit) on Nov 14, 2002 at 15:42 UTC | |
by neilwatson (Priest) on Nov 14, 2002 at 16:33 UTC | |
Re: Help with complex data structures
by Three (Pilgrim) on Nov 14, 2002 at 15:13 UTC |