Since the MACs come with many scripting languages pre-installed the scripts are essentially run by double clicking on the file name, although manually launching them from the terminal should work as well.

For example:

$ python foo.py
$ ./foo.py

In the second case the script AND in the case of double-clicking the filename, the script would have to include the appropriate shebang line, for example #!/usr/bin/python for Python scripts and #!/usr/bin/perl for Perl scripts.

This will allow the MACs to know where to locate Python and Perl, respectively.

If for some reason this doesn't work, make sure the script is saved with a UNIX style EOL (end of line) so that the shebang will be read properly by the MAC.

A good text editor like Notepad ++ (Windows) easily allows one to make these changes to text files.