Are you claiming that you've located a Windows perl whose @INC consists only of C:/Perl/site/lib (and perhaps also .) ?
No, I am claming, that on windows, I find such path. I've never said, that that's the only path, I find.
I've read every post in this thread and I still struggle to understand what you are seeking.
I don't know, how much more clearly to explain, which I did several times and in different formulations.
How much more clearly I need to describe, that I need my programs to know system (independently of OS) paths with the least amount of code added to every program.
They need to know system common library paths, systemwide config paths, program/bin, etc., so my code was correct.
How do you think I would use the whole string of paths to get the final file?
From your code, I'd get:
"/etc/perl /usr/local/lib/perl/5.18.2 /usr/local/share/perl/5.18.2 /us
+r/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.18 /usr/share/perl/5.18
+/usr/local/lib/site_perl "
How do you think, it would be useful? How do you think, I would locate a final file with such a path?
If I would really need such a result, there is a better and shorter way to do it:
$libPath = join(" ", grep { $_ ne "." } @INC);
How do you think, I would put my libraries, finding system paths in this, "found" path? How would I do, even a simple thing, such as (with the resulted path from your suggested code)?:
&cp($file2Copy, "$libPath/$file2Copy");
No, I only need one (possibly, first found) path to place the common file to, and nothing is expected, that's why I need a way to determine the path. If I would "expect" some path, as you say, I would just use it, since, it would be on all systems, as "expected".
print "@INC\n";
And how do you think, this would be useful? | [reply] [d/l] [select] |