Thank you, but $0 will tell me the path and the file name of the script.pl
file, not the path from where I ran the script.

If the current path is:
/var/www
(This path is shown by pwd command).

and the script is in:
/home/script.pl

if I run:
perl /home/script.pl

if the script will print $0, it will print:
/home/script.pl

But I want it to print:
/var/www
(Meaning the current directory).

Now, I could run pwd and get what I want, but in fact I need to run this
program under Windows.

Thanks.

Teddy

----- Original Message ----- 
From: "Charles K. Clarkson" <[EMAIL PROTECTED]>
To: "'Octavian Rasnita'" <[EMAIL PROTECTED]>
Sent: Sunday, October 26, 2003 6:40 PM
Subject: RE: Finding the current path


> Teddy,
>
>      It should be part of $0.
>
> HTH,
>
> Charles K. Clarkson
> -- 
> Head Bottle Washer,
> Clarkson Energy Homes, Inc.
> Mobile Home Specialists
> 254 968-8328
>
>


-------------------------------------------------------
Xnet scaneaza automat toate mesajele impotriva virusilor folosind RAV AntiVirus.
Xnet automatically scans all messages for viruses using RAV AntiVirus.

Nota: RAV AntiVirus poate sa nu detecteze toti virusii noi sau toate variantele lor.
Va rugam sa luati in considerare ca exista un risc de fiecare data cand deschideti
fisiere atasate si ca MobiFon nu este responsabila pentru nici un prejudiciu cauzat
de virusi.

Disclaimer: RAV AntiVirus may not be able to detect all new viruses and variants.
Please be aware that there is a risk involved whenever opening e-mail attachments
to your computer and that MobiFon is not responsible for any damages caused by
viruses.


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to