File: findperl

package info (click to toggle)
kdoc 2.0a53-7
  • links: PTS
  • area: main
  • in suites: woody
  • size: 444 kB
  • ctags: 279
  • sloc: perl: 5,711; sh: 190; makefile: 139; cpp: 54
file content (17 lines) | stat: -rwxr-xr-x 205 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/sh

test -f perlbin && rm perlbin

for p in `echo $PATH | tr ":" " "`
do
	if [ -x $p/perl ]
	then
		if $p/perl -e 'require 5.6.0;' 
		then
			echo $p/perl > perlbin
			exit 0
		fi
	fi
	
done
exit 1