Portable implementation of `which' in Perl
