in reply to Breaking a script into smaller files

Well,
$0 =~ m,(.*?)[^/\\]+$, and unshift @INC, $1;
works pretty well.

*G*

Replies are listed 'Best First'.
Re: Re: Breaking a script into smaller files
by John M. Dlugosz (Monsignor) on Nov 13, 2001 at 00:39 UTC
    Do all OS's hide the real path syntax and use a / or \ for the contents of $0? If so, what would it do with the directory :arrivals:11/01:foo.pl on a Macintosh?

    I want to always use a core module to manipulate file names, so I don't have to worry about such things.