-1

Our applications run with Strawberry Perl, and if any other Perl (Active Perl) version is installed our application won't work. Is there any way to check if multiple Perl (Strawberry, Active) versions are installed on the machine?

doppelgreener
  • 4,809
  • 10
  • 46
  • 63
Ninja
  • 3
  • 3

1 Answers1

1

This will tell you how many versions of perl are in the PATH directories

perl -E '@p = `which -a perl`; printf "%d copies of perl in the path\n", 0+@p'

output

2 copies of perl in the path
Borodin
  • 126,100
  • 9
  • 70
  • 144
  • Above command works for Linux environment. – Ninja Dec 08 '16 at 04:51
  • perl -e "print $^X" command prints Perl paths on Windows. – Ninja Dec 08 '16 at 04:51
  • @Pradeep: Rather than commenting on my answer, it would have helped us to give you better answers if you had answered some of the questions above. We can't know the details of what you're trying to do if you won't tell us. I wrote this answer in exasperation as it seemed like we weren't going to get any more information. It was a wild guess that may help someone. – Borodin Dec 08 '16 at 04:57