Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
Perl
Perl Misc
Call Perl Scripts from Other Dir in Linux, Path Messed Up
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Steve Grazzini, post: 4746570"] One of the authors said on p5p ([URL]http://xrl.us/2gb[/URL]) On some platforms when a script is called via PATH, instead of directly, $0 does not contain the full path to the script (I am assuming that caller would return the same value as $0 in such a case). This is why FindBin goes to a great extent to locate the real position of the script. But I'm not sure whether this is correct. It looks to me like the only time perl searches $PATH is when running under the -S switch, regardless of platform. And when perl finds the script in $PATH, it will always set $0 to an absolute path or a path relative to the current directory. Getting rid of the $PATH search would also fix the "KNOWN BUG" in FindBin's documentation. Do you know if either of these have been reported as bugs? I found this ticket (from 1999, marked "resolved") but couldn't find the explanation. [URL]http://rt.perl.org/rt2/Ticket/Display.html?id=1845[/URL] [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
Perl
Perl Misc
Call Perl Scripts from Other Dir in Linux, Path Messed Up
Top