CentOS definitely has its system perl executable in /usr/bin.<br><br>As Mike suggested, you should probably be a normal user for doing the configure and make test. You&#39;ll need to sudo the make install if you want to put it in /usr/local but not if under $HOME.<br>
<br>Good luck,<br>Rob<br><br><div class="gmail_quote">On Thu, Jan 15, 2009 at 9:31 AM, Mike South <span dir="ltr">&lt;<a href="mailto:msouth@gmail.com">msouth@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><div></div><div class="Wj3C7c">On Wed, Jan 14, 2009 at 10:36 PM, J C &lt;<a href="mailto:jim.x.casey@gmail.com">jim.x.casey@gmail.com</a>&gt; wrote:<br>
&gt; Hi,<br>
&gt;<br>
&gt; I bought the O&#39;Reilly 5th edition Learning Perl the other day and it&#39;s<br>
&gt; great. I am new to programming and Perl as well. I do know my way<br>
&gt; around Linux but I am having problems upgrading from the version that<br>
&gt;<br>
&gt; was on my OS (Cent OS 5.2) to 5.10. I downloaded Perl 5.10 from<br>
&gt; <a href="http://www.cpan.org/authors/id/R/RG/RGARCIA/perl-5.10.0.tar.gz" target="_blank">http://www.cpan.org/authors/id/R/RG/RGARCIA/perl-5.10.0.tar.gz</a>, then<br>
&gt;<br>
&gt; tar -xvzf perl-5.10.0.tar.gz the package in /usr/local/bin &nbsp; I then<br>
&gt; followed the README guide that said to:<br>
&gt;<br>
&gt; ./Configure -des -Dprefix=$HOME/localperl<br>
&gt; &nbsp; make test<br>
&gt; &nbsp; make install<br>
&gt;<br>
&gt; Now, the first command was probably my mistake because I really have<br>
&gt;<br>
&gt; no idea what that would do. I figured that I could simply use the<br>
&gt; shebang after make test and make install was done &quot;doing it&#39;s thing&quot;<br>
&gt; and type out #!/usr/local/bin/perl-5.10.0 or &nbsp;#!/usr/local/bin/<br>
&gt;<br>
&gt; perl-5.10 and everything was work just fine and I would be using Perl<br>
&gt; 5.10 This obviously is not the case as now it tells me I still have<br>
&gt; 5.8.8 installed. I know this is probably a very common problem and<br>
&gt; I&#39;ll try and do all the research I can when I find the time but if any<br>
&gt;<br>
&gt; of you that are a lot more experienced could help me out and &quot;put me<br>
&gt; in the right direction&quot; that would be great.<br>
&gt;<br>
&gt; Here is the code from the book (page 68) I am trying to run:<br>
&gt; ---------------------------------------------------------------------------------------<br>
&gt;<br>
&gt; #!/usr/local/bin/perl-5.10.0 &nbsp; &nbsp; # I&#39;ve also used perl5.10 and every<br>
&gt; other thing I could think of...<br>
&gt; use 5.010;<br>
&gt; use strict;<br>
&gt;<br>
&gt; sub marine {<br>
&gt; &nbsp; &nbsp; &nbsp; $n += 1;<br>
&gt; &nbsp; &nbsp; &nbsp; print &quot;Hello, sailor number $n!\n&quot;;<br>
&gt;<br>
&gt; }<br>
&gt;<br>
&gt; &amp;marine;<br>
&gt; &amp;marine;<br>
&gt; &amp;marine;<br>
&gt; ----------------------------------------------------------------------------------------<br>
&gt; And here is the output I am getting when I try running it:<br>
&gt; Perl v.5.10.0 required --this is only v.5.8.8<br>
&gt;<br>
&gt; ----------------------------------------------------------------------------------------<br>
&gt;<br>
&gt; I&#39;ve also noticed that now there&#39;s a perl5.10.0 located in the /root/<br>
&gt;<br>
&gt; localperl/bin so I am sure it has something to do with the<br>
&gt; above .Configure command.<br>
<br>
</div></div>You are right--what you have done is said &quot;I want to make an<br>
installation of perl 5.10 in /root/localperl&quot;. &nbsp;The idea of that<br>
configuration option (which would normally be done as a regular user)<br>
is that you can experiment with the new version of perl in your own<br>
local directory (hence the $HOME) even if you don&#39;t have root access<br>
to the machine you are working on.<br>
<div class="Ih2E3d"><br>
&gt;Can anyone give me some advice on how to get<br>
&gt; 5.10 working? I feel like I am close, but nothing so far.<br>
<br>
</div>Well, one thing you can try, just to see if what you did worked, is<br>
change the shebang line in your test script to<br>
<br>
#!/root/localperl/bin/perl<br>
<br>
But I&#39;m not sure what the permissions on /root/localperl are going to<br>
be. &nbsp;So, unless you run it as root, you might just get an error that<br>
says you don&#39;t have permission to run that. &nbsp;The idea of that<br>
configure command is that you run the configure command as the user<br>
you are going to run perl as.<br>
<br>
You might just want to start over and do this as a regular user. &nbsp;Make<br>
a directory called src/ in your home directory, copy<br>
perl-5.10.0.tar.gz to that directory, and unpack it there (tar xzvf as<br>
you did before). &nbsp;Then run the configure, make, make install just like<br>
you did before. &nbsp;This time you should end up with a directory called<br>
<br>
/home/jcasey/localperl/bin<br>
<br>
and it will have the perl 5.10 executable in it.<br>
<br>
So a shebang line of<br>
<br>
#!/home/jcasey/localperl/bin/perl<br>
<br>
should then work.<br>
<br>
You might want to just make sure that it works and everything before<br>
trying to overwrite the perl on your system, which the system may be<br>
using to get things done.<br>
<br>
[Rob&#39;s answer came in as I was writing this.]<br>
<br>
The way Rob suggested, rerunning configure with prefix set to<br>
/usr/local/, will put 5.10 in /usr/local/bin/perl. &nbsp;I think CentOS has<br>
perl in /usr/bin/perl. &nbsp;If that&#39;s right (you can check with &quot;which<br>
perl&quot;), and you do what Rob suggests, you will get 5.10 in<br>
/usr/local/bin/perl, and the system can keep using the perl it was<br>
already using, in /usr/bin/perl. &nbsp;That should be a pretty safe option,<br>
too, and is probably the normal way to do things.<br>
<br>
As the other perl mongers can tell you, I never come around to the<br>
normal way of doing things except by excessively circuitous routes.<br>
<font color="#888888"><br>
mike<br>
</font><div><div></div><div class="Wj3C7c"><br>
&gt;<br>
&gt; thanks in advance,<br>
&gt;<br>
&gt; jim<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; Raleigh-talk mailing list<br>
&gt; <a href="mailto:Raleigh-talk@pm.org">Raleigh-talk@pm.org</a><br>
&gt; <a href="http://mail.pm.org/mailman/listinfo/raleigh-talk" target="_blank">http://mail.pm.org/mailman/listinfo/raleigh-talk</a><br>
&gt;<br>
&gt;<br>
_______________________________________________<br>
Raleigh-talk mailing list<br>
<a href="mailto:Raleigh-talk@pm.org">Raleigh-talk@pm.org</a><br>
<a href="http://mail.pm.org/mailman/listinfo/raleigh-talk" target="_blank">http://mail.pm.org/mailman/listinfo/raleigh-talk</a><br>
</div></div></blockquote></div><br>