That'll work except for the somewhat obscure case where
one of arguments is a string consisting entirely of whitespace. You'll lose it when you build up you command
variable.
This may work better:
proc my_exec {prog_name args} {
eval [concat exec $prog_name $args]
}
# test
puts [my_exec ls index.html index-all.html "" ]