[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

[MacPerl] Re: lib and referances



At 11:32 PM -0800 12/6/99, Nicholas G. Thornton wrote:
>use File::Basename;
>$dir = &dirname($INC{'Time.pm'});
>$dir .= 'beginning.txt';
>open FILE, "<$dir" or die "can't open '$dir' for input";
>
>yields
>
># can't open ':beginning.txt' for input.


Do you "use Time" in your script?  %INC doesn't automatically get 
loaded with every possible module, only with the ones you're using. 
Try this:

use File::Basename;
$dir = dirname($INC{'File/Basename.pm'}); #the one you're *sure* you're using
etc.

And yes, it's a /, even under MacPerl.

>
>--Nick

--
Paul Schinder
schinder@pobox.com

# ===== Want to unsubscribe from this list?
# ===== Send mail with body "unsubscribe" to macperl-request@macperl.org