Hi all,
I am very new to Perl. I have had assembler and Rexx experience on a
mainframe. I would like to be able to use Perl to list a directory, get
the propeties of the files (eg. date created), and keep the newest 3.
The reason I want to do this is because I am running a UDB system that
creates weekly backups. The backups never get deleted unless I do that
by hand. I would like to keep the 3 newest UDB backups. Any help, in
any direction, would be greatly appreciated. Once I get started on
this, I think perl will make more sense to me.
The directory structure is:
UDB
Backups
Folder1
udbbck01.bak
Folder2
udbbck02.bak
Folder3
udbbck03.bak
|
|
|
Folder(n-1)
udbbck(n-1).bak
Folder(n)
udbbck(n).bak
Bret Goodfellow
Questar Gas,
S.L.C., UT
> perldoc perl
Will provide a list of available documentation.
> perldoc -f <function name>
Will provide documentation on a specific function.
> perldoc <module name>
Will provide documentation on a specific module.
In this case you will probably want to start with,
perldoc File::Find perldoc -f stat
You might also consider checking out http://learn.perl.org and might be interested in the "Learning Perl" book from O'Reilly. Most of the above listed docs can usually be read online at http://www.perldoc.com but it has been a little flaky lately.
Be *sure* to start your program with:
use strict; use warnings;
Good luck, send more questions when you have them,
http://danconia.org
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>