Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to find out which perl I am using when running a script with '/usr/bin/env perl'?

Tags:

perl

With a shebang like #!/usr/bin/env perl how can I make accessible to the script the perl I am using for running the script?
(Like in the perl -E 'say $ENV{_}' command line).

like image 515
sid_com Avatar asked Dec 16 '22 04:12

sid_com


1 Answers

From perlvar, there's the $^X variable you could use.

$ perl -e 'print $^X, "\n";'
/usr/bin/perl5.12.4
like image 59
Mat Avatar answered Apr 08 '23 15:04

Mat