ONJava.com -- The Independent Source for Enterprise Java
oreilly.comSafari Books Online.Conferences.


AddThis Social Bookmark Button
  Learning the Mac OS X Terminal, Part 4
Subject:   Perl Scripts
Date:   2006-05-26 01:30:22
From:   samueljenningshughes@yahoo.com
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 Terminal.app, 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 Terminal.app, and in the directory of which the script is located.