[exim] 4.96 reduce not working

Góra strony
Delete this message
Reply to this message
Autor: Jasen Betts
Data:  
Dla: exim-users
Temat: [exim] 4.96 reduce not working

I was using the follwing form to see how many elements of list 1 occur in list2


${reduce{ a:p:p:l:e }{0}{${if inlisti{$item}{ p:e:z }{${eval:$value+1}}{$value}}}}

but this has stopped working in 4.96

It seems to be inlisti is overwriting $value :(

Ah yes, this feature is documented.


the way I'm using it the first list is a tainted variable and the
second is a constant macro.

I guess I can rewrite it is

${reduce{ a:p:p:l:e }{0}{${if or{\
{eqi{$item}{p}}\
{eqi{$item}{e}}\
{eqi{$item}{z}}\
}{${eval:$value+1}}{$value}}}}

but I can't use the macro for that :(

is there a better way?

--
Jasen.