Portable implementation of which(1) in Perl
