On Thursday, July 18, 2002, at 03:26 , chris wrote:

> How to get folder name of current script running?


### #!/usr/bin/perl -w
### use strict;
### use File::Basename qw/dirname/;
### use Cwd;
###
### my $name = $0;
### my $dir = dirname $name;
### my $curdir= cwd;
###
### print $name . " is In $dir - but Called from $curdir \n";

[jeeves:~] drieux% Iam
/home/drieux/bin/Iam is In /home/drieux/bin - but Called from /Users/drieux
[jeeves:~] drieux% cd ~/bin
[jeeves:~/bin] drieux% ./Iam
../Iam is In . - but Called from /Users/drieux/bin
[jeeves:~/bin] drieux%

hth

ciao
drieux

---


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

Reply via email to