Providing a Link to Perl


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Providing a Link to Perl
# 1  
Old 10-08-2000
I was wondering how I can create a link to the perl interpreter.

On my old machine perl is at: user/local/bin/perl
and my new machine has it at: user/bin/perl

I don't want to have to change all my cgi scripts when I move them to the new server. Can I just create a new directory (user/local/bin/perl) and provide some sort of link to perl?

How?

Thanks.
# 2  
Old 10-09-2000
If you want to create links, there are numerous ways to do it. For example:

If your original perl distribution is at:

/usr/local/lib/perl

and you want to link it to /usr/local/perl

just do this:

ln -sf /usr/local/lib/perl /usr/local/perl

(note that /usr/local/perl SHOULD NOT EXIST before
the command above).

This will create a symbolic link from /usr/local/lib/perl
(a directory) to the /usr/local/perl directory

You can also use symbolic links on individual files.

# 3  
Old 10-10-2000
thanks for the quick reply.

does this mean that perl scripts which have the first line set to #!/usr/local/perl

will still work even though perl actually resides at /usr/local/lib/perl as long as I create a symbolic link between the two directories?

# 4  
Old 10-10-2000
Yes. You can use the 'same magic' as before as you show in your post.
# 5  
Old 10-10-2000
thanks a bunch. i'll give it a shot...

 
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Help me in just providing idea about what to be done?

Hi, I am thinking to increase my knowledge towards shell scripting and tcl scripting. The thing is, please suggest me a script which i can code is useful in learning as well as to project it to my team mates and it is helpful to all my office team mates. I'll give you an idea of what we... (4 Replies)
Discussion started by: Syed Imran
4 Replies

2. Shell Programming and Scripting

Awking string only 6 character long and providing a count

Morning Guys, I am attempting to awk a file which strings in the file is only 6 characters long and not more. Currently it is counting every line and giving a count of 59, but it should be 57 (not including the long baracode - 004705CIM*****) " awk '/./ {cnt++} END {print cnt}'... (11 Replies)
Discussion started by: Junes
11 Replies

3. UNIX for Advanced & Expert Users

perl/sed -i removes link

hello, is it a behavior of or that "-i" removes unix link . example : i create a file "src_file" and link it to "link_file" and then i start "perl -i" the link is removed. does another option exists to change content of a file without temporary files ? UNIX-Version: HP-UX and... (2 Replies)
Discussion started by: bora99
2 Replies

4. Programming

g++ fails to link to static library when compilation and link in single command

Hello All, I've encountered a strange behaviour from g++ that doesn't make sense to me. Maybe you can shed some light on it: I have a bunch of source files and want to compile them and link them with a static library liba.a located in /usr/local/lib64 into an executable Approach 1 works... (0 Replies)
Discussion started by: magelord
0 Replies

5. Shell Programming and Scripting

Providing variable contents to awk

Hello, All. This is my first post here, and I expect that the answer is simple, but I can't find it. Might be the way I'm searching. I'm fairly new to Unix/Linux, and I'm writing a Korn Shell Script. I am trying to provide a value that is already in a variable to awk so that awk can pull out the... (3 Replies)
Discussion started by: compguy74
3 Replies

6. Shell Programming and Scripting

Help needed with bash script providing battery status

I'm really new to even doing a bash "hello world" script, so maybe someone would know how to do the following task, using bash scripting Need to login using ssh from one dell server into another dell server, and obtain the raid battery status, using dell's open manage software commands; then... (5 Replies)
Discussion started by: AJ-102111
5 Replies

7. Shell Programming and Scripting

Search Files from Array and link to original location in Perl

Hello, Question is related to Perl: I need to search few of the files from the array of file names. And after grepping the file names from an array I need to link these files to original location. The original location in this case is ref_path as input from the user. ##$ref_path is... (3 Replies)
Discussion started by: aarora1
3 Replies

8. Shell Programming and Scripting

Grepping text by providing line numbers.

Dear Friends, I have a flat file from which I want to grep line no. 7,10, 19 to 35, 37. How can it be done? Thank you in advance Anushree (6 Replies)
Discussion started by: anushree.a
6 Replies

9. Shell Programming and Scripting

script providing input to application prompts

Hi! I want to write a script that will create an archive (via tar) that will restrict the size of the tar file. The size can be constrained using the keyword 'k' and providing the size restriction. The problem is that the script needs to know (detect) when the tar command prompts the user (which... (2 Replies)
Discussion started by: mitch8
2 Replies
Login or Register to Ask a Question