Scripting trouble

Discussion in 'Perl Misc' started by y, Oct 1, 2004.

  1. y

    y Guest

    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?
     
    y, Oct 1, 2004
    #1
    1. Advertising

  2. y <> wrote:


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

    ^^^^
    ^^^^

    perldoc -f echo


    --
    Tad McClellan SGML consulting
    Perl programming
    Fort Worth, Texas
     
    Tad McClellan, Oct 2, 2004
    #2
    1. Advertising

  3. y

    Joe Smith Guest

    y wrote:

    > 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
     
    Joe Smith, Oct 2, 2004
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Wilfredo Perez

    vb.net scripting

    Wilfredo Perez, Feb 23, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    543
    James Peters
    Feb 24, 2004
  2. Mark
    Replies:
    3
    Views:
    628
    Joe Smith
    Mar 18, 2005
  3. Hypo
    Replies:
    6
    Views:
    463
  4. Ron Stephens
    Replies:
    23
    Views:
    3,042
    Ron Stephens
    Apr 12, 2004
  5. DaveInSidney
    Replies:
    0
    Views:
    469
    DaveInSidney
    May 9, 2005
Loading...

Share This Page