Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: fileparse(): need a valid pathname

by sundialsvc4 (Abbot)
on Jul 07, 2018 at 23:56 UTC ( #1218090=note: print w/replies, xml ) Need Help??


in reply to fileparse(): need a valid pathname

Although it concerns PHP, the site https://www.sitepoint.com/php-server-api-differences/ has some good description of how web server configurations might vary some include certain environment variables (specifically this one) while others do not.   Some define SCRIPT_FILENAME as the name of the CGI script.   Therefore, as our friend Anonymous Monk has already suggested, let Perl itself tell you the name of the script that it is now executing.   This should be bulletproof.

I have also seen “trampoline” code that was intended to facilitate running (very) old code in new environments, which set certain environment-variable values that the hoary old legacy code was expecting before passing-off control to the old software.

Replies are listed 'Best First'.
    A reply falls below the community's threshold of quality. You may see it by logging in.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1218090]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (4)
As of 2019-12-11 02:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?