Re: [exim] Undefined variable in eval: (string expansion)

Top Pagina
Delete this message
Reply to this message
Auteur: Toralf Lund
Datum:  
Aan: Exim Mailing List
Onderwerp: Re: [exim] Undefined variable in eval: (string expansion)

>
>>> What do I get if I do something like
>>>
>>> ${eval:$some_variable+1}
>>>
>>> when "some_variable" is not actually defined?
>>>
>> Looks like it treats some_variable as 0:
>>
>> root@clayman:~# /usr/sbin/exim -be
>> > ${eval:$acl_m9+1}
>> 1
>> >
>>
>
> Hmmm. More accurately, it expands to the empty string so your eval becomes:
>
> ${eval:+1}
>
> Which evaluates to 1
>

Ah, of course. It didn't occur to me just now that <nothing>+1 is a
valid expression as long as the value 1 may also be expressed as "+1".

Thanks.

- Toralf