using use.perl

Kris Kennaway kris at obsecurity.org
Fri Oct 3 15:57:54 PDT 2003


On Fri, Oct 03, 2003 at 11:04:16AM -0700, Gary Schenk wrote:
> I'm running 4.7-RELEASE as my home desktop. I've compiled perl 5.8 from 
> the ports. It was installed in /usr/local/bin/perl.
> 
> After that installation # perl -v resulted in perl, version  5.005_3
> 
> # /usr/local/bin/perl -v resulted in perl, v 5.8.0
> 
> If I call /usr/local/bin/perl in my scripts, I realize that the new 
> version will be used. 
> 
> However after running the command # use.perl port, I wonder if old 
> scripts that call /usr/bin/perl will be interpreted under v 5.8.0.
> 
> If there was a symbolic link placed between /usr/local/bin/perl and 
> /usr/bin/perl which version would be used?

That's precisely what use.perl does:

xor# ls -l /usr/bin/perl
lrwxr-xr-x  1 root  wheel  19 Jun 19 17:34 /usr/bin/perl -> /usr/local/bin/perl

Therefore, scripts that call /usr/bin/perl will execute the version
installed in /usr/local/bin/perl, i.e. 5.8.0 in your case.

Kris
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20031003/ac5659f4/attachment.bin


More information about the freebsd-questions mailing list