PugTheBlack
ISP
Where is the cwd actually set ?
When I run a perl-script from a webpage with the following directory structure
g:\
that is supposed to list the content of the folder g:\
it instead listst the content of C:\WINNT
use Cwd;
$path = getcwd;
print "$path\n";
returns c:\winnt - and I would want it to return g:\
I know I can just hardcode the script to use the path I want, but I thought I'd ask you guys first...
here is the entire script as written by default :
#!/usr/bin/perl
print "Content-type: text/html\n\n";
open (STDERR, ">&STDOUT"
;
print "Dateien im aktuellem Verzeichnis . sind: \n";
opendir DIESESVERZEICHNIS, "." or die "Kann Verzeichnis nicht ffnen: $!";
@alledateien = readdir DIESESVERZEICHNIS;
closedir DIESESVERZEICHNIS;
print "@alledateien\n";
exit(0);
"." should refer to the users homedir, but instead lists c:\winnt ... any idea why ??
When I run a perl-script from a webpage with the following directory structure
g:\
that is supposed to list the content of the folder g:\
it instead listst the content of C:\WINNT
use Cwd;
$path = getcwd;
print "$path\n";
returns c:\winnt - and I would want it to return g:\
I know I can just hardcode the script to use the path I want, but I thought I'd ask you guys first...
here is the entire script as written by default :
#!/usr/bin/perl
print "Content-type: text/html\n\n";
open (STDERR, ">&STDOUT"
print "Dateien im aktuellem Verzeichnis . sind: \n";
opendir DIESESVERZEICHNIS, "." or die "Kann Verzeichnis nicht ffnen: $!";
@alledateien = readdir DIESESVERZEICHNIS;
closedir DIESESVERZEICHNIS;
print "@alledateien\n";
exit(0);
"." should refer to the users homedir, but instead lists c:\winnt ... any idea why ??