eval 

Usage:
/eval Command Block

Description:
       Eval will parse through the command block and then execute it. Useful for parsing arguments into commands. You must be careful about user supplied input here, including names of players. This applies to using commands in the Command Block.

Escaping /eval arguments

# This is the WRONG way
on a_d.WithFlag cmd /eval foreach ($(pt)) /say_resp . Enemy flag dropped at \\\[ $loc($(pz)) \\\] by $(pn).;

# The proper way escapes $(pn), since the eval evaluates all variables
# once, you would be left with
# foreach (blue) /say_resp . Enemy flag dropped at \[ Blue Foyer \] by -D$-Bobs;
# The say_resp command will make an additional variable pass (as all commands do)
# and would parse -D$-Bobs as if it were a variable.
on a_d.WithFlag cmd /eval foreach ($(pt)) /say_resp . Enemy flag dropped at \\\[ $loc($(pz)) \\\] by $escape($(pn)).;

# The reasoning behind doing /eval in the above examples is that it will only evaluate the location and name once,
# even though it repeats the command for each player on the team.
# This is an oudated way of doing it -- '/say_stat (targ=$(pt))' would be more efficient.