Suppose I have a list of names of Symbols:
f1 := Print[\"f1 is evaluated!\"];
list = {\"f1\", \"f2\"};
The obvious way to
Here is yet another technique to do this:
SetAttributes[blockAlt,HoldRest];
blockAlt[s : {__String}, body_] :=
Replace[Join @@ ToHeldExpression[s], Hold[x__] :> Block[{x}, body]]
We save here on pure functions, due to the disruptive nature of rules (they don't respect other scoping constructs, including themselves)
EDIT
Yet another alternative (even shorter):
SetAttributes[blockAlt1, HoldRest];
blockAlt1[s : {__String}, body_] :=
Block @@ Append[ToHeldExpression@ToString[s], Unevaluated[body]]