Kyle Lanclos wrote:
> Dennis wrote:
>> You can rip out a lot of code (well, some code) if you just use the Perl 
>> date method by default and forget the date +%s stuff entirely.
> 
> Your mileage may vary.
> 
> $ time perl -le print+time
> 
> real    0m0.002s
> 
> $ time date +%s
> 
> real    0m0.001s
> 
> (Those results were surprisingly consistent on my Linux box.)

For a script that runs a few times a day it is not significant. The 
other optimization point to consider is development and maintenance 
time. Building and validating tests for conditions in arbitrary 
environments is difficult and prone to failure. If you can reduce the 
number of external tool requirements, especially platform-specific 
tools, it is probably a good thing. If you can easily design in platform 
independence with a single supertool that you know you already need then 
go with it.

The entire script can be written in any of sh, bash, ksh, perl, ruby, 
php, python, or REXX. I agree it is unnecessarily cross-bred, but again, 
it's a very low-level utility that runs seldom and so won't benefit by a 
lot of optimizations and the time required to create them can be better 
spent with the family.

dp
_______________________________________________
Help us build a comprehensive ClamAV guide: visit http://wiki.clamav.net
http://lurker.clamav.net/list/clamav-users.html

Reply via email to