Determing Script Location 
Author Message
 Determing Script Location

Hi,

I was wondering if anybody could tell me a good module to use to find the
location of where the running script is located?  Thanks in advance.



Wed, 26 Jan 2005 13:14:48 GMT  
 Determing Script Location

Quote:

> I was wondering if anybody could tell me a good module to use to find the
> location of where the running script is located?  Thanks in advance.

perldoc FindBin

John
--
use Perl;
program
fulfillment



Wed, 26 Jan 2005 16:22:57 GMT  
 Determing Script Location



Quote:

> > I was wondering if anybody could tell me a good module to use to find
the
> > location of where the running script is located?  Thanks in advance.

> perldoc FindBin

> John
> --
> use Perl;
> program
> fulfillment

Thanks.  =)

Does anyone know a good help page for this, I've see the general info page
that activestate has and have search the web for more but to no avail and
the pages I have looked at have been very brief.



Wed, 26 Jan 2005 22:10:21 GMT  
 Determing Script Location

Jason> Does anyone know a good help page for this, I've see the
Jason> general info page that activestate has and have search the web
Jason> for more but to no avail and the pages I have looked at have
Jason> been very brief.

Just ask your question.  The module is small and straightforward, and
a lot of people out here have used it.  What didn't the info page
answer for you?

The most important thing about FindBin is that for Unix platforms,
it's Heavy Overkill, since it searches PATH when it really doesn't
need to (the $0 is either the full path already, or a relative path
from the current directory, in which case you simply prepend
Cwd::cwd's output).  But perhaps it has a useful purpose on Windows?

print "Just another Perl hacker,"

--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095

Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!



Thu, 27 Jan 2005 01:57:44 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Determing the location of perl in a Perl script

2. Determing if a variable is a number?

3. determing integer or string.

4. Determing GUI/Character environment

5. print Location and print "Location

6. Form Scripts Location?

7. Determining CGI script location

8. Script self-awareness in regards to location

9. Script self-awareness in regards to location

10. Location of a file modifiable by a CGI Script

11. calling another script & location url

12. redirection using Location: in Perl CGI script

 

 
Powered by phpBB® Forum Software