944,047 Members | Top Members by Rank

Ad:
  • Perl Discussion Thread
  • Marked Solved
  • Views: 10188
  • Perl RSS
Feb 14th, 2007
0

Get the location of the perl script

Expand Post »
Does any of you know how to get the pathname of the perl script that is being executed?

Say it is located in /home/wolfpack/perl/
I run it from /home/wolfpack by giving the absolute path name like,

/home/wolfpack/perl/scriptname [arguments]

I want to get the path /home/wolfpack/perl so that I can use some files inside that directory so that perl does not search for them inside the current working directory which is /home/wolfpack/
Similar Threads
Moderator
Reputation Points: 572
Solved Threads: 115
Mentally Challenged Mod.
WolfPack is offline Offline
1,559 posts
since Jun 2005
Feb 14th, 2007
0

Re: Get the location of the perl script

I just read about $0 in the Llama book. I think I can do something with it.
Moderator
Reputation Points: 572
Solved Threads: 115
Mentally Challenged Mod.
WolfPack is offline Offline
1,559 posts
since Jun 2005

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Perl Forum Timeline: Creating a Robust Logout System
Next Thread in Perl Forum Timeline: New in the hood have some problems





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC