Thanks: Eric, Brian and Doug. I forgot to say that I also want my scripts to be portable, so I used Doug's solution, modified for bash: export PERL5LIB=/sw/lib/perl5:$HOME/bin Yesterday, when I uploaded this perl script, together with a directory containing the module, to my web host (DreamHost), it "just worked". All the perl tutorials I've read say it is standard practice to put your module subdirectories in the same directory with your scripts. Funny that this doesn't "just work" in OS X.