procmail
[Top] [All Lists]

Re: strlen() in procmail

2003-01-14 22:13:39
Sean wrote,

| Thus, for completeness:
|
| #---
| STRLEN=0
|
| :0
| * 1^1 STRING ?? > 1
| {
|          STRLEN=$=
| }
|
| LOG="The length of $STRING is $STRLEN$NL
| #---

You don't have to initialize STRLEN to 0.  $= will be set as long as the
recipe is tried, even if it fails for a non-positive score.

 :0
 * 1000^0
 { }

 LOG="The special variable \$= now equals $=.
" # says 1000, doesn't it?

 STRING=

 :0
 * 1^1 STRING ?? > 1
 { }
 STRLEN = $=

 LOG="The length of \$STRING is $STRLEN.
" # got reevaluated, didn't it?

 HOST


_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>