Using Perl for the first time on my Mac

kevinh

Registered
Hi Everybody,

I have recently bought a Mac G5 and want to learn a bit about Perl. I have downloaded Perl from ActivePerl and have been using the text editor to write simple programs such as hello world and so on. These programs are saved as .rtf which I then changed to .pl. I made them executable and tried to run the programs. I get lots of error messages and when I

cat my_program.pl

it shows lots of characters wrapping around the content of the program.

Do I need to use something else to write programs or how do I modify text editor to get it to work?

Thanks for the help, I am a mere novice to both Mac and Perl so please be gentle!!
 
If you are using Textedit.app you need to go the menu and select Format->Make Plain Text Then you can save the file as my_program.pl and it should work.

The rtf file includes all sorts of formatting and font information that only breaks things.
 
I would recommend downloading and installing TextWrangler, free, from BareBones Software:

http://www.barebones.com/products/textwrangler/index.shtml

For coding and the like, it's got context-sensitive highlighting, auto-completion and a number of other features that will make writing code a hell of a lot easier than using TextEdit. Plus, you don't have to worry about the whole RFT-Plaintext thing, as TextWrangler only does plaintext (I believe).
 
Thanks for the help guys/gals

I will give it a go over the week end and see how I get on. It 's nice to know that theres help if you need it.
 
Back
Top