V
vikrant
hi,
i have a script example.pl currently store at location "/home/vikrant/scripts/".
Now,what i want to do is to find the above path means where
my script(example.pl) store or currently exists when i run
my script(example.pl) in the following different ways:-
1.
the output i need is /home/vikrant/scripts/
2.
this time the output i need is same means "/home/vikrant/scripts/".
Please tell me how can i get the exact path of my script
while executing it from different location.
Thanks
Vikrant
i have a script example.pl currently store at location "/home/vikrant/scripts/".
Now,what i want to do is to find the above path means where
my script(example.pl) store or currently exists when i run
my script(example.pl) in the following different ways:-
1.
cd /home/
perl vikrant/scripts/example.pl
the output i need is /home/vikrant/scripts/
2.
cd /home/sameer/
perl /home/vikrant/scripts/example.pl
this time the output i need is same means "/home/vikrant/scripts/".
Please tell me how can i get the exact path of my script
while executing it from different location.
Thanks
Vikrant