Re: [Exim] condition question

Startseite
Nachricht löschen
Nachricht beantworten
Autor: George Schlossnagle
Datum:  
To: Sebastian Stark
CC: exim-users
Betreff: Re: [Exim] condition question
The problem isn't that the braces are misbalanced. I checked that
before I sent it to the list.

Incidentally, adding a undef $/ or $/="" will allow you to match it
across the entire document/single line breaks, whihc makes it nicer on
long-queries.

george

Sebastian Stark wrote:
>
> Yann Golanski wrote:
> > > I keep getting misplaced { }'s errors. Any thoughts/suggestions?
> > Try vi (or vim) and shift+% that will match your brackets.
> > ${if and {{${lookup mysql{select $${local_part}}}}}}
>
> The following perl skript detects non matching braces:
>
> ---
>
> #!/usr/bin/perl -w
> $str = <STDIN>;
> $c = 0;
> for (split //, $str) {
> $_ eq '{' && $c++;
> $_ eq '}' && $c--;
> $c lt 0 && die "Something's wrong (you closed a brace you never opened)\n";
> };
> print "$c (0 means o.k., positive value means you forgot $c closing braces)\n";
>
> ---
>
> (not perfect, but useful for debugging)
>
> --
> ## List details at http://www.exim.org/mailman/listinfo/exim-users Exim details at http://www.exim.org/ ##