Scripting trouble

Y

y

I am unable to run scripts on OSX. Here is what I did:

I created a file script (no extensions) as follows:
#!/usr/bin/perl
echo "Hello"

And then I save it. After that I go to my shell and try running this
file and I get the following message:
bash: /Users/Y/script: /usr/bin/perl: bad interpreter: Permission
denied

Any idea what I am doing wrong, and how I can fix this?
 
J

Joe Smith

y said:
bash: /Users/Y/script: /usr/bin/perl: bad interpreter: Permission denied

Try running
/usr/bin/perl -v
from the bash prompt. If it says Permission denied, there's your culprit.
-Joe
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top