Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

perl in different locations on different sites

Tags:

perl

I have a lot of perl scripts. I will be supporting multiple sites which might not have the same perl paths (shebang line).

How can I avoid changing the top shebang line in each of the perl scripts?

This is all in the unix environment.

regards, Gordon

like image 290
Gordon Avatar asked Dec 22 '22 16:12

Gordon


1 Answers

The usual solution is to use the env command:

#! /usr/bin/env perl
like image 199
cjm Avatar answered Dec 26 '22 18:12

cjm