Gunnar Hjalmarsson wrote:
Shams Fantar wrote:
Gunnar Hjalmarsson wrote:
opendir my $d, $dir or die $!;
my @oldfiles = grep -f "$dir/$_" && -M _ > 10, readdir $d;
if ( @oldfiles ) {
# do something
}
Thank you for this solution, but I would pref
Tom Phoenix wrote:
On 9/4/07, Shams Fantar <[EMAIL PROTECTED]> wrote:
The mtime, atime and ctime functions don't exist in the perl
documentation, normal? :)
That's right. In Perl, we access those three timestamps in more than
one way, but normally not by a function wi
yitzle wrote:
On 9/4/07, Shams Fantar <[EMAIL PROTECTED]> wrote:
The mtime, atime and ctime functions don't exist in the perl
documentation, normal? :) Without documentation, I cannot use mtime...
Regards,
--
Shams Fantar (http://snurf.info)
You retrive those values us
Gunnar Hjalmarsson wrote:
Shams Fantar wrote:
Here is the algorithm :
"If there is a file in this directory which is old likewise of 10
days, to delete it or else, do nothing."
Do you have ideas to say "If there is a file which is old likewise of
10 days" in perl?
Tom Phoenix wrote:
On 9/3/07, Shams Fantar <[EMAIL PROTECTED]> wrote:
Do you have ideas to say "If there is a file which is old likewise of 10
days" in perl?
There are three timestamps that can mean the age of a file: the mtime,
atime, and ctime. If you want to know
perl?
Best regards,
--
Shams Fantar (http://snurf.info)
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/
Adriano Ferreira wrote:
On 9/3/07, Shams Fantar <[EMAIL PROTECTED]> wrote:
Hello,
I want to give a date (the year, the day, the hour and the minute) to a
file. So, I use localtime function. But I don't understand how to use
localtime (after reading the documentation on this fun
Jeff Pang wrote:
2007/9/3, Shams Fantar <[EMAIL PROTECTED]>:
Jeff Pang wrote:
try the POSIX::strftime,this use the same datetime format as shell's
date command.
perl -e '
use POSIX qw/strftime/;
print strftime("%y%m%d %H:%M",localtime); '
070903 21:51
d with the Shell function ?
[2] : http://perldoc.perl.org/Shell.html
And for this question ?
Regards,
--
Shams Fantar (http://snurf.info)
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/
;m a beginner with perl... :-)
Thanks !
--
Shams Fantar (http://snurf.info)
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/
10 matches
Mail list logo