Perlish way to get absolute path of current working directory?

B

Bob Walton

Is there a Perlish non-OS-dependent way to get the absolute path of the
current working directory of a Perl program? Thanks.
 
J

Jürgen Exner

Bob said:
Is there a Perlish non-OS-dependent way to get the absolute path of
the current working directory of a Perl program?

Has been answered several times in the last two days:

perldoc Cwd

jue
 
D

David K. Wall

Bob Walton said:
Is there a Perlish non-OS-dependent way to get the absolute path of the
current working directory of a Perl program? Thanks.

use FindBin;
 
R

Ryan Shondell

Bob Walton said:
Is there a Perlish non-OS-dependent way to get the absolute path of
the current working directory of a Perl program? Thanks.

use Cwd;

my $dir = cwd;
 
V

Vlad Tepes

Is there a Perlish non-OS-dependent way to get the absolute path of
the current working directory of a Perl program? Thanks.

use Cwd;
my $dir = getcwd;

--
(,_ ,_, _,)
/|\`\._( )_./'/|\
· · \/ L /\ D · ·
/__|.-'`-\_/-`'-.|__\
` " `
 
J

Jürgen Exner

David said:
use FindBin;

The OP was explicitely asking for the current working directory.
Exactly which function or variable in FindBin does provide this information?

jue
 
D

David K. Wall

Jürgen Exner said:
The OP was explicitely asking for the current working directory.
Exactly which function or variable in FindBin does provide this
information?

None of them, of course. I think I'm getting senile.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top