in reply to Re: Breaking a script into smaller files
in thread Breaking a script into smaller files
I agree that File::Basename::fileparse will be a little simpler in this case than File::Spec::splitpath, because it doesn't separate the volume out. So it becomes
Assuming it's OK to leave off the @suffix parameter. The dirname function in that module looks like a natural, except for the enigmatic comment at the bottom: "For example, for the input file specification lib/, fileparse() considers the directory name to be lib/, while dirname() considers the directory name to be ." Huh? If I don't understand what it's doing, I can't use it.use lib { my ($base,$path)= File::Basename::fileparse ($0); $path };
And I still wonder if $0 contains the actual path, or just what was on the command line.
—John
|
|---|