how to install Perl

Joined
Dec 23, 2005
Messages
44
Reaction score
0
Points
6
Location
London, UK
Your Mac's Specs
PowerBook G4 17", 1.67GHz, 2GB RAM, 120 GB HDD. Ipod 20GB
Hi Everyone,

How can I install Perl on OSX? Secondly, should it be run from the terminal? Any help would be greatly appreciated.

Everett
 
Joined
Apr 2, 2006
Messages
125
Reaction score
5
Points
18
Location
Edmonton, Canada
Your Mac's Specs
15" MacBook Pro, 12" iBook G4, 14" iBook G4 running Ubuntu 7.10
Perl should already be installed on your mac. To check, open a terminal and type:

which perl

This will show you where it is.

You can run it from the terminal, I am not really sure how to run a shell script from a point and click perspective, but you may be able to. Also, you may want to look at perl/tk if you would like to build a graphical app out of your script.

http://www.perltk.org/

Hope that helps!
 
Joined
Dec 8, 2009
Messages
453
Reaction score
10
Points
18
Location
The same as Sheldon Cooper - East Texas
Your Mac's Specs
iMac 2014 i5 5k 32gb 1tb fusion, second TB display, 2014 MBA
This is an old post so my answer is just for future searches.

If you want to run a pure Perl environment you can separately install the latest version of Perl with PerlBrew. (google it). This will set the latest Perl in your home folder, separate from the one that comes with OSX.

Several good reasons for this...

OSX's Perl tends to be downlevel - this way you can get the latest.

The new install will be stand alone, and will not require any interaction with system files, so you don't run the risk of nuking your system by making system wide changes during install or updates.

Installing addons like Perl/TK and pkdev and all the CPAN modules you want becomes dead easy, with no worry about missing or wrong libraries. Again, without the risk of whacking your OS.

And, if you should mess up your private Perl environment, just delete the whole Perl folder, then install it again.

When you do a Cat upgrade, say from Lion to Mountain Lion, or from ML to Puddy Tat (or whatever comes next) any changes to the system Perl are destroyed, including that weird CPAN module that you need, but can't for the life of you remember how to install on OSX. WIth PerlBrew, it doesn't care if the Cat has spots or stripes - it just keeps working.

For heavy Perl users, especially those who move scripts back and forth between OSX and 'nix boxes, it takes a lot of the hassle out of maintenance.
 
Joined
Dec 8, 2009
Messages
453
Reaction score
10
Points
18
Location
The same as Sheldon Cooper - East Texas
Your Mac's Specs
iMac 2014 i5 5k 32gb 1tb fusion, second TB display, 2014 MBA
Some confusion among installees. You must have XCode installed to get the Unix utilities, such as the compilers and utilities needed outside of that suite.

Or... If you don't need that massive suite, you can just install the Command Line Utilities. You will go through a short registration as a Developer, but it's free.

The CLU package is vastly smaller.
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top