Like in Perl, variable names begin with a dollar sign, followed by a letter or an underscore, optionally followed by more letters, digits, or underscores.
Also like in Perl, variables can contain strings.
$five = 5; $answer = ($five << 3)+2; $rate = 135.5 Mbps; $host = "www.foo.edu";
If an expression stored in a variable is not constant, it is inserted ``as is'' wherever the variable is referenced. Note that any references to fields or other variables are resolved at the time of assignment.
$cond = ip_src == 184.108.40.206 && tcp_sport == 80; ... class (1) if $cond; ... field tcp_sport = ...; // does not change $cond ... class (2) if $cond;