./ Command not found

J

jbermudes

I am trying to run a script in unix by saying ./form.pl but it always
gives me an error saying "Command not found." However, I can say perl
form.pl and the script will execute properly. I have been assured by my
Network admin that the permissions are set correctly and that perl is
located in the right location and that the include file is also
properly set and located.

The script is:

#!/usr/bin/perl
push(@INC,"/www/cgi-bin");
require ("cgi-lib.pl");
&ReadParse;
print &PrintHeader;
open(MAIL, "|mail bermu103\@chapman.edu");

print MAIL "From: ",$in{'email'},"\n";
print MAIL "Subject: Comments/Suggestions\n";
print MAIL "Name: ",$in{'name'},"\n";
print MAIL "Text: ",$in{'text'},"\n";
print MAIL "\n\n";
close MAIL;

print "<HTML><HEAD><TITLE>Feedback Response </TITLE></HEAD>\n";
print "<BODY BGCOLOR=#FFFFF0>
<CENTER>
<H3>Form Processed</H3>

<B>
<P>Your feedback has been accepted.</P>

<P>
<A
HREF="http://www.chapman.edu/~bermu103/courses/cpsc353/index.html">Return</A><BR>
</P>
</B>
</BODY></HTML>";


Any suggestions of what could be wrong would be much appreciated!

Thanks
 
I

it_says_BALLS_on_your_forehead

I am trying to run a script in unix by saying ./form.pl but it always
gives me an error saying "Command not found." However, I can say perl
form.pl and the script will execute properly. I have been assured by my
Network admin that the permissions are set correctly and that perl is
located in the right location and that the include file is also
properly set and located.

The script is:

#!/usr/bin/perl
push(@INC,"/www/cgi-bin");
require ("cgi-lib.pl");
&ReadParse;
print &PrintHeader;
open(MAIL, "|mail bermu103\@chapman.edu");

print MAIL "From: ",$in{'email'},"\n";
print MAIL "Subject: Comments/Suggestions\n";
print MAIL "Name: ",$in{'name'},"\n";
print MAIL "Text: ",$in{'text'},"\n";
print MAIL "\n\n";
close MAIL;

print "<HTML><HEAD><TITLE>Feedback Response </TITLE></HEAD>\n";
print "<BODY BGCOLOR=#FFFFF0>
<CENTER>
<H3>Form Processed</H3>

<B>
<P>Your feedback has been accepted.</P>

<P>
<A
HREF="http://www.chapman.edu/~bermu103/courses/cpsc353/index.html">Return</A><BR>
</P>
</B>
</BODY></HTML>";


Any suggestions of what could be wrong would be much appreciated!


maybe you need to include '.' in your path.
 
G

Gunnar Hjalmarsson

I am trying to run a script in unix by saying ./form.pl but it always
gives me an error saying "Command not found." However, I can say perl
form.pl and the script will execute properly. I have been assured by my
Network admin that the permissions are set correctly and that perl is
located in the right location

My guess would be that the script has Windows linefeed characters.
Re-upload it in ASCII transfer mode.
 
J

jbermudes

Thank you so much, that was the problem. Reuploading it in ASCII mode
solved it. thanks!
 
T

Tintin

Thank you so much, that was the problem. Reuploading it in ASCII mode
solved it. thanks!

The next thing you need to work on now is improving that horrible code you
have.
 
A

axel

it_says_BALLS_on_your_forehead said:
I am trying to run a script in unix by saying ./form.pl but it always
gives me an error saying "Command not found." However, I can say perl
form.pl and the script will execute properly. I have been assured by my
Network admin that the permissions are set correctly and that perl is
located in the right location and that the include file is also
properly set and located.
The script is:
#!/usr/bin/perl
push(@INC,"/www/cgi-bin");
[snip]
Any suggestions of what could be wrong would be much appreciated!
maybe you need to include '.' in your path.

Rather dangerous. In any case using ./form.pl does specify
this explicity.

Axel
 

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

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top