http://www.perlmonks.org?node_id=52398


in reply to FindBin is broken (RE: How do I get the full path to the script executing?)
in thread How do I get the full path to the script executing?

Ahh. Suppose you call chdir before you call FindBin. I believe it will still work. But your rel2abs($0) will no longer be accurate.

So, with the caveat that you cannot call chdir before rel2abs, you can use it in place of FindBin.

-- Randal L. Schwartz, Perl hacker