But anyway, patch for the Perl path attached. Thanks. Your method seems as good as any to me.
I thought about using 'grep -q' and checking the exit code, but maybe this version is more portable. Indeed, grep -q is not portable. It's necessary to >/dev/null instead. --thanks again, karl.