CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: General Discussions: General Questions:
Cannot execute perl script in Mac OS X using $./script_name

 



roger
New User

Jun 11, 2008, 1:13 PM

Post #1 of 3 (4433 views)
Cannot execute perl script in Mac OS X using $./script_name Can't Post

Hi, I hope you can help me, I looked for an answer in many places and I couldn't find an answer.

When I try to execute a perl script in the shell as $./script_name the shell tells that "cannot execute binary file".

However, if I run it as $perl script_name , it works OK.

File permissions are set to 755.

#!/usr/bin/perl line is also correct ($whereis perl -> /usr/bin/perl)

I cannot figure out what is wrong, as some scripts that I wrote some time ago run equally well with $script_name and with $perl script_name

I will really appreciate your help!!
Thanks,

Roger


(This post was edited by roger on Jun 11, 2008, 1:23 PM)


KevinR
Veteran


Jun 11, 2008, 9:34 PM

Post #2 of 3 (4415 views)
Re: [roger] Cannot execute perl script in Mac OS X using $./script_name [In reply to] Can't Post

I don't know anyhting about Mac OS X, I suggest you ask on www.perlmonks.com and see if one of the members there can advise you.
-------------------------------------------------


roger
New User

Jun 17, 2008, 6:35 AM

Post #3 of 3 (4141 views)
Re: [KevinR] Cannot execute perl script in Mac OS X using $./script_name [In reply to] Can't Post

Thank you, Mac OS X is built over the BSD UNIX os, so with the terminal you access a UNIX shell, and perl runs in UNIX. I specified that is MacOS X because may be there are differences that I obviously don't know and can produce this behaviour.

Anyway, I will also post the question in perlmonks...

Thank you again,

Roger

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives