Thread
:
Get Current Directory Of Script
View Single Post
Nov 5th, 2005, 12:33 PM
#
2
tempest
Programming Guru
Join Date: Oct 2004
Posts: 1,041
Rep Power:
5
[php]
#!/usr/bin/perl
$pwd = "";
open(getPwd, "/bin/pwd |");
while(<getPwd>) {
$pwd .= $_;
}
close getPwd;
print "The working directory is, " . $pwd;
[/php]
There is probably a much simpler way, my perl skills are rudimentary.
__________________
tempest
View Public Profile
Find More Posts by tempest