Learning the Mac OS X Terminal, Part 4
Subject:   Perl Scripts
Date:   2006-05-26 01:30:22
Response to: Perl Scripts

The best method to use is, at the top of the scripts, write "#!/usr/bin/perl", which tells a terminal to execute this script using perl.

Next, you should open, which is in /Applications/Utilities.

Type "cd location-of-perl-script".

Then type "chmod a+x perl-script-filename" to make it executable.

lastly, to run the script, either type "perl perl-script-filename" or "./perl-script-filename", the latter if you added "#!/usr/bin/perl" to the top of the script. this is done of course in the, and in the directory of which the script is located.