Copy a variable to all processes in julia

From the manual of julia's @everywhere:

Prefixing @everywhere with @eval allows us to broadcast local variables using interpolation:
foo = 1
@eval @everywhere bar=$foo