$0 =~ m,(.*?)[^/\\]+$, and unshift @INC, $1; [download]
In reply to Re: Breaking a script into smaller files by growlf in thread Breaking a script into smaller files by John M. Dlugosz