http://qs321.pair.com?node_id=1210962


in reply to How do I use 'which' in the hash-bang line?

I usually use

#!/usr/bin/env perl

which runs the (first) perl found in the PATH environment variable. See env.