- or download this
my $drive = substr(getcwd(), 0, 2);
chdir('C:\\');
chdir($drive);
- or download this
use strict;
use warnings;
...
__END__
Produces:
No such directory 'C:/testdir'
- or download this
use strict;
use warnings;
...
printf "You are in '%s' on the 'D' drive\n", getdcwd('D');
print "\n";
}
- or download this
You are in 'C:\Documents and Settings\liverpole\perl' on the current d
+rive
You are in 'D:\testdir' on the 'D' drive
...
[.] [..] a.txt b.txt c.txt
3 File(s) 24 bytes
2 Dir(s) 3,777,839,104 bytes free