Tony Darnell wrote:

(Please forgive the newbie question)

I have been using Perl on Mac OS 9.2. With 9.2, I have a little program that I use to run scripts.
Okay, so you were running MacPerl.

I have OS X on my other Mac, and I want to run these same scripts. At a command prompt, I tried the obvious - "perl script_name.pl", but no luck.
The number one problem encountered while going from MacPerl to OS X Perl is that your MacPerl scripts will almost definitely use Mac linefeeds, while OS X Perl requires Unix linefeeds. Change that using BBEdit or some other program (or even "perl -i.bak -p -e 's/\r/\n/g' <script>").

After that, assuming you've got a workable shebang (#!/usr/bin/perl or similar) at the beginning, you should be fine--your only worry would be any MacPerl-specific modules your script may have used.

pg

Reply via email to