Hello,
I'm having a tough time using chdir in different versions of perl in a dos window (XP). In early versions of Perl 5.x it works just fine. I have a bat file that dynamically sets my perl path to either 5.0.x or to 5.8.8:
Then in I call the perl script which just has this:
[code=perl]
$dirLocation ='c:\[whatever]';
chdir $dirLocation or die "Can't cd to $dirLocation: $!\n";
[/code]
In the earlier version of perl it works fine and moves dos to that directory. In 5.8.8 it doesn't. But nor does it die. It just doesn't switch directories. I've confirmed that it's at least looking for a valid dir by changing $dirLocation to something nonexistent and it does indeed then balk. So what am I missing here???
Thanks for any help.
John
I'm having a tough time using chdir in different versions of perl in a dos window (XP). In early versions of Perl 5.x it works just fine. I have a bat file that dynamically sets my perl path to either 5.0.x or to 5.8.8:
Code:
path %path%;c:\perl\[whichever]
[code=perl]
$dirLocation ='c:\[whatever]';
chdir $dirLocation or die "Can't cd to $dirLocation: $!\n";
[/code]
In the earlier version of perl it works fine and moves dos to that directory. In 5.8.8 it doesn't. But nor does it die. It just doesn't switch directories. I've confirmed that it's at least looking for a valid dir by changing $dirLocation to something nonexistent and it does indeed then balk. So what am I missing here???
Thanks for any help.
John
Comment