# Perl update question



## talsamon (May 14, 2015)

The path to perl seemed changed from /usr/bin/perl to /usr/local/bin/perl. Some scripts don't work. I can't change every she-bang to the right path.
But I am unsecure, with link I should set. The are three possibilites:
/usr/bin/perl
/usr/bin/perl5
or
directrly to
/usr/bin/perl5-5.20


----------



## talsamon (May 14, 2015)

Was a to less exact. Some scripts only work if I change the she-bang line to /usr/local/bin/perl - and that is not logical. I don't how many script are problematic and if I should set a link.


----------



## talsamon (May 14, 2015)

It's clear the above mentioned three files seems the same - solved.


----------



## kpa (May 14, 2015)

Ports and packages are no longer allowed to modify /usr/bin (or any other part of the base system), that's why the perl path was changed.

http://svnweb.freebsd.org/ports/head/UPDATING?r1=386270&r2=386269&pathrev=386270&diff_format=c


----------



## wblock@ (May 14, 2015)

Use

```
#!/usr/bin/env perl
```


----------



## kpa (May 14, 2015)

getopt said:


> This does not work in perl5.20 anymore.
> Have to use instead:
> 
> ```
> ...



Works fine for me with 
	
	



```
#!/usr/bin/env perl
```
 and perl version 5.20. You sure you have /usr/local/bin on your $PATH ?


----------



## Oko (May 15, 2015)

wblock@ said:


> Use
> 
> ```
> #!/usr/bin/env perl
> ```


Somebody is using too much Bash and Linux 

At OP. What is the problem with creating the symbolic link

`ln -s /usr/local/bin/perl /usr/bin/perl`


----------



## wblock@ (May 15, 2015)

Oko said:


> Somebody is using too much Bash and Linux



Nothing to do with either, just a simple, standard solution that fixes the problem this thread is about.


----------



## abishai (May 15, 2015)

kpa said:


> Ports and packages are no longer allowed to modify /usr/bin (or any other part of the base system)


All ports? I rely on /etc/ssl/cert.pem symlink CA-bundle makes.


----------



## kpa (May 15, 2015)

abishai said:


> All ports? I rely on /etc/ssl/cert.pem symlink CA-bundle makes.



Can you test if your applications continue to work without that symlink? I do remember a discussion on the mailing lists that the base system OpenSSL would use the certificate bundle from ports if installed without creating the symlink in /etc/ssl.


----------



## abishai (May 15, 2015)

Yes, with configuration pointed to new ca file location. But it would be surprise if symlink just vanished after port upgrade, I noticed this thread by accident


----------



## wblock@ (May 15, 2015)

which(1) looks in the path, too.  As far as cron(8), see #2 in The Interrupted Unix FAQ.


----------

