Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: FindBin is broken

by Aristotle (Chancellor)
on May 28, 2002 at 18:46 UTC ( #169875=note: print w/replies, xml ) Need Help??


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

This reply is very late, but I think needs adding. rel2abs($0) will probably break if you are running setuid on a modern Unix. To avoid a race condition, these kernels do not pass the filename of a setuid script to its interpreter but rather a "virtual" filename (somewhere in /proc on Linux if I'm not mistaken) which is rigidly associated to the file the kernel opened. The filename Perl sees in that case and consequently the $0 value would bear no relation to the actual location of the script. (Of course, FindBin will not work any better in that case.)

Makeshifts last the longest.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://169875]
help
Chatterbox?
[Corion]: If you have whitespace in the column names in the database, whap the DBAs ;)
[shmem]: It's common for some vendors to have column names such as WRSTVG or some other such whizzbang, and another table where these names are mapped to something meaningful depending on how you look at the data
[shmem]: afair in SAP that occurs all the time
[shmem]: afair in SAP that sort of indirection is sprinkled all over the database (for hysterical raisins)

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (12)
As of 2017-05-25 13:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?