in reply to Falling at the first hurdle

First, points for trying to write your first Perl program on the command line (Terminal). Since you're already there here are a few commands to begin reading the documentation:

In addition to the good advice already provided to you, in terms of using a "Programmer's" text editor, there are some nice choices on the Mac. You can try out Vi right away as Corion suggested. It's a little strange at first but a perfect way to start is going back to the Terminal and enter vimtutor. You'll then be prompted to hit enter/return. This interactive tutorial takes about half an hour and is REALLY worth the time. You can also download a GUI version of Vim for the Mac called MacVim and have access to some helpful plugins for programming Perl.

There is also BBEdit, which I've used for a while and really like. It's pricey (especially compared to Vi ($99.99 US) but there's a free trial as well as a basic version called Text Wrangler.

Good luck and have fun.

"...the adversities born of well-placed thoughts should be considered mercies rather than misfortunes." — Don Quixote

Replies are listed 'Best First'.
Re^2: Falling at the first hurdle
by Your Mother (Archbishop) on Feb 19, 2011 at 22:54 UTC

    If you’re on a Mac and willing to pay, the right thing to buy is TextMate. Single license is $55 US right now and it’s a very deep, scriptable, pluggable editor for code and templates.

      Oh I've used TextMate. (Although not since it was more around $40) It's well designed, easy to jump into and grow with. I just like BBEdit more. But like I said - the Mac has nice choices :)


      "...the adversities born of well-placed thoughts should be considered mercies rather than misfortunes." — Don Quixote