On Wed, 05 Sep 2007 14:56:27 +0200, Shams Fantar wrote:
> 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 prefer to write it myself. ;-)
>>
>> Well, that was an ... unexpected response. ;-)
> 
> Sorry for my answer, it was not nasty. :P As I'm a beginner with perl, I 
> prefer to write my scripts myself.

Gunnar's reply was a compliment.  The part of his response that answers
your question is the -M _ > 10 clause.  Look up the -M operator with
"perldoc -f -X".

-- 
Peter Scott
http://www.perlmedic.com/
http://www.perldebugged.com/


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to