User Guide : Using Content Extraction Language : Language Syntax and Examples : reject;
Share this page             
The reject statement causes processing for this line to stop. The script control is immediately returned to the first pattern block and the next line is processed. This statement allows the script writer to prevent superfluous processing and speed up program execution. The break statement does the same thing. Internally there is no difference; they generate exactly the same actions. Two names are provided to allow the word used to better reflect the intent. Break implies normal processing is finished; reject implies we want nothing to do with this line. The only difference is in the readability of the script.
Example 1
if(length(trim($0)) == 0) REJECT; #
Reject blank lines
Example 2
/^[0-9]/ { invoice = $0(1 7); BREAK; } # Process next input line after
# invoice number found