Hello.
I have Windows98. I wrote a
small script just to change
directory.
$a=chdir("bin");
print $a;
this script prints 1. So chdir returned
true after success. But in reality
directory is not changed. The directory
named "bin" exists in the current directory.
Is this problem of portability
Use the Cwd module to confirm where you are...my guess is that you're ok.
Check this snippet out. Worked on my win2k machine. Remember that the *script* will
change directories. When it exits you'll be back where you started.
###
use Cwd;
use strict;
my $dir=getcwd;
prin
This is what happened. The Perl process did change dir, but remember when
it ends
it goes with all its baggage, so the parent process does not have anything
to do
with the chdir.
Try this:
#!/opt/local/bin/perl
$dirname = "./TEST";
chdir("$dirname"); #this sets current directory to ./TEST