in reply to Re: Breaking a script into smaller files
in thread Breaking a script into smaller files
I've used File::Basename for a similar purpose--I think __FILE__ is probably more appropriate than $0, though. I'm guessing that either
or the push @INC variant of the same thing would work.use lib dirname __FILE__;
I don't think $0 is appropriate because if memory serves it only contains the base name of the file if the script is invoked that way (for instance if it's in the user's PATH somewhere). Though I could be totally wrong about that :-)
|
|---|