Solved

Newbie question

Posted on 2002-06-08
7
174 Views
Last Modified: 2010-08-05
Hi!

I am totally new to Perl & Linux. The reason is that I've found a very promising program using Perl. So I installed a Linux box and installed the program.
The problem is that its shell scripts calls Perl scripts like this:

./ScriptName.pl

On my system it doesnt work and I have to type:

perl ScriptName.pl

I don't want to change the scripts because I'm sure I'm missing something.

Can you melp?
Thanks.
0
Comment
Question by:ornicar
7 Comments
 
LVL 8

Expert Comment

by:jhurst
ID: 7064990
While you do not specify the exact message that you receive when you run this I wold be certain that it is one of two things:

a) the ScriptName.pl is not executable
b) the first line of the script: #!/usr/loca/bin/perl or whatever does not contain the correct address of the perl interpretter.
0
 
LVL 9

Author Comment

by:ornicar
ID: 7065073
Sorry to reject your answer but I still have problems with this. It doesn't come from the scripts because its a proofed application.
I installed Perl 5.6 and the error disappears.
Then the prog. told me then that socket.ph was not found and I have to run h2ph, which I did. Now it goes further with a syntax error in socket.ph. The message is:

syntax error at /usr/local/lib/perl5/site_perl/5.6.1/i686-linux/sys/socket.ph line 15, near ") ("
syntax error at /usr/local/lib/perl5/site_perl/5.6.1/i686-linux/sys/socket.ph line 35, near "}"
Compilation failed in require at /usr/local/lib/perl5/5.6.1/chat2.pl line 18.
Compilation failed in require at /usr/local/lib/perl5/5.6.1/ftp.pl line 100.
Compilation failed in require at ./flcollect.pl line 16.
[root@daisy ftplocator]# vi /usr/local/lib/perl5/site_perl/5.6.1/i686-linux/sys/socket.ph

Sure there is something wrong with my installation, not the scripts.

The box is a P II 400Mhz. Why i686 as folder?

0
 
LVL 8

Expert Comment

by:jhurst
ID: 7065393
Your suggestion that it is a prooved application does not prove much.  b) would fit with this if perl was mnot on the same location on the two machines.  This fits with the new install too since you could now have perl where it needs to be according to the first line of the script.

Are you sure that this script will run with per 5.6?

What was the original error that you were getting before the 5.6 installation?
0
VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

 
LVL 8

Expert Comment

by:bebonham
ID: 7067094
I agree with jhurst completely.

what is a prooven script...matts form mail??? :)


perl is probably not in the same place

do you have usr/local/bin/perl

or do you have usr/bin/perl or what

since perl is standard in linux, it is unlikely you could have messed up the install.

0
 
LVL 9

Author Comment

by:ornicar
ID: 7068592
You are surely right. My Linux is still missing something: By checking the socket.ph file where the error is, it mention something about _cplusplus variable, and the empty brackets looks like I have an empty environment variable.
I'll try next week-end to install C++ and tell you what happend.
Anyway, the points are yours, jhurst.
0
 
LVL 8

Accepted Solution

by:
jhurst earned 100 total points
ID: 7068623
Well, thank you.

I post this answer so you can give them to me.

Please do post what you find though, we will all learn something.
0
 

Expert Comment

by:SpideyMod
ID: 8303313
Force Accepted

SpideyMod
Community Support Moderator @Experts Exchange
0

Featured Post

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Email validation in proper way is  very important validation required in any web pages. This code is self explainable except that Regular Expression which I used for pattern matching. I originally published as a thread on my website : http://www…
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question