In the long run, it’s far better to write functions with arguments as parameters than scripts.with global arguments for any code you want to re-use. (You can still use scripts — just put the script in a short file that uses/includes your other code and passes ARGS
as function parameters.)
See also Best practise: organising code in Julia - #2 by stevengj and Best practise: organising code in Julia - #4 by stevengj