[Greylist-users] relaydelay error
Evan Harris
eharris at puremagic.com
Tue Dec 23 09:11:04 PST 2003
Sorry for the slow reply. This has been covered several times on the list
and is in the archives, the fix is in cvs, but here it is again:
if (substr($rowids,0,1) > 0) {
Evan
On Tue, 23 Dec 2003, Allan E Johannesen wrote:
> >>>>> "keith" == Keith <keith at acsinc.net> writes:
>
> keith> Can anyone give me a clue why I see this in the maillog? Argument
> keith> "42355,42356" isn't numeric in numeric gt (>) at
> keith> /usr/src/relaydelay-0.04/relaydelay.pl line 381.
>
> Yes. The argument in the if statement is not numeric. It clearly isn't, since
> it has a comma in it.
>
> I'm sure that the Mr. Harris knows much more about perl than I do. > is
> supposed to be a numeric comparitor, but I believe it is used here to check
> whether a string is non-empty. Maybe this is "normal" perl.
>
> I wrote a short perl script to just check whether this works on something
> containing a comma, and it does work. Obviously, sometimes it does not work,
> since we've both seen this error.
>
> I couldn't locate a perl function "tell me if the argument is numeric", or
> "tell me if the argument is a string", so I'm not sure how to fix this.
>
> Instead of:
>
> if ($rowids > 0) {
>
> one might write:
>
> if (defined($rowids) &&
> ($rowids ne "0"))
>
> or maybe just
>
> if ($rowids ne "0")
>
> I submitted a query like yours few days ago and nobody made a comment.
>
> Maybe it's not seen in other environments.
>
> I'm running perl 5.8.2 on RedHat Linux 7.
>
>
More information about the Greylist-users
mailing list