John W. Krahn wrote:
> Igor Sutton Lopes wrote:
>>
>>sub move_file {
>>
>>    # using -M is better than doing the calculation to obtain the 
>>difference
>>    # from now and three days ago.
>>    return unless -M $_ < 3;
> 
> Why not just use the modified( '>3' ) rule?

Ok, modified( '>3' ) won't work because the file test rules don't take or use
arguments.  However "return unless -M $_ < 3;" won't work correctly either as
it means that you are moving files that are *newer* not *older* than three
days.  Also you are using the directory() rule which means that only
directorys are moved, not files.



John
-- 
Perl isn't a toolbox, but a small machine shop where you can special-order
certain sorts of tools at low cost and in short order.       -- Larry Wall

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


Reply via email to