Need help running perl script on Mac OS X

Joined
Nov 12, 2010
Messages
20
Reaction score
0
Points
1
I'm completely new to Mac and just bought a Macbook Pro yesterday. I love this computer and everything about this operating system and platform in general. Here's the issue I'm having that I have done extensive research on and just don't understand the answers. Keep in mind I'm 110% new to macs!

To run a perl script on my PC computer before I downloaded ActiveState's ActivePerl program and installed it. Then I would just double click my .pl file I have saved to execute the script and it would open a dos like window and run it.

Well I transferred all my stuff over to the new Macbook Pro and now that .pl file just opens as a text file. It isn't executable anymore. What is the easiest method of running the script? I've tried a bunch of things in Terminal that I read while doing research but nothing has worked. I tried downloading ActivePerl for mac also hoping it would just recognize it and let me execute the file but that failed as well. I can't figure this out for the life of me!

Please help a brother out. I appreciate it!
 
Joined
May 14, 2009
Messages
2,052
Reaction score
136
Points
63
Location
Near Whitehorse, Yukon
Your Mac's Specs
2012 MBP i7 2.7 GHz 15" Matte - 16 GB RAM - 120 GB Intel SSD - 500 GB DataDoubler Mac OS 10.9
Some experimenting and I came up with this, make the script executable with chmod 700 ~/Desktop/Test.sh
Once I did that I can just drag & drop the file into the Terminal window and press enter and it will run.
 
OP
B
Joined
Nov 12, 2010
Messages
20
Reaction score
0
Points
1
You already lost me. I need the "For Dummies" version of step by step what to do. I have no idea what making a script executable with chmod 700 even means. Please break this down for me.
 
Joined
May 14, 2009
Messages
2,052
Reaction score
136
Points
63
Location
Near Whitehorse, Yukon
Your Mac's Specs
2012 MBP i7 2.7 GHz 15" Matte - 16 GB RAM - 120 GB Intel SSD - 500 GB DataDoubler Mac OS 10.9
Okay,

#1 Open Terminal and type in chmod 700(space)(drag the .pl file here). In the end it should look like this chmod 700 ~/Desktop/hellworld.pl This step only needs to be done once.

#2 From now one just drag and drop the file into the Terminal window and press enter. The script will now run.
 
OP
B
Joined
Nov 12, 2010
Messages
20
Reaction score
0
Points
1
Okay,

#1 Open Terminal and type in chmod 700(space)(drag the .pl file here). In the end it should look like this chmod 700 ~/Desktop/hellworld.pl This step only needs to be done once.

#2 From now one just drag and drop the file into the Terminal window and press enter. The script will now run.

Just tried this and still no success. It doesn't do anything when I type that in and drag my file there. I press enter after doing that and it just goes down to the next line but nothing happens.
 
Joined
May 14, 2009
Messages
2,052
Reaction score
136
Points
63
Location
Near Whitehorse, Yukon
Your Mac's Specs
2012 MBP i7 2.7 GHz 15" Matte - 16 GB RAM - 120 GB Intel SSD - 500 GB DataDoubler Mac OS 10.9

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