in reply to Problem with running Perl script on Mac OSX

If it's not the dos2unix issue, try creating a new script file from scratch -- no copying, etc -- type it in. You could have invisible control characters embedded in there somewhere, depending on your choice of editor. This issue has bitten me before.

Just a security note -- I know it's your wife's laptop -- a better choice for permissions would be 755. Setting permissions to 777 (everyone has full access) is a bad habit. If you ever get a job doing perl CGI scripts or something like that, you'll need to be careful.
  • Comment on Re: Problem with running Perl script on Mac OSX

Replies are listed 'Best First'.
Re^2: Problem with running Perl script on Mac OSX
by dracos (Sexton) on May 31, 2006 at 18:21 UTC
    I relize that 777 is dangerous but that is what my wife set it to when she was trying to get it working initaly I am in the process of teaching her about unix security and good computing practices.