blc3355447 has asked for the wisdom of the Perl Monks concerning the following question:
On machine1, I get what you would expect ... both print outputs are "c:\temp". However, on machine2 when I use version 5.8.8 the script returns what one would expect, but when it uses the 5.6.1 install, it returns "cd=c:\" and "c:\temp". Why in the world could it be different? How I found this was when I was using one of the before mentioned administration scripts, I kept receiving a "file not found" error. After quite a while of debugging, I found the calls and soon learned that if I moved the file to c:\, the files were then found and the script would run fine. I then narrowed down the symptoms to the above statements so I wouldn't have to wade through a lot of residual noise. One of the things I tried to try to change the outcome was to just add a chdir command. However, it did not work since it still returned "c:\" for the first print output and "c:\temp\ldif" for the second.# use Cwd; print "\ncd=" . `cd`; print "\ngetcwd=" . getcwd(); #
I have tried it on other machines as well with similar "dual implementations". Most returned the expected consistent results. However, one other machine returned the inconsistent result. The only thing I could see which was similar with machine 2 was both had SFU (windows services for unix) installed. So, I tried to uninstall SFU on machine 2 and restart. Unfortunately it did not help. I have reviewed all environmental vars on the two machines and now that SFU is no longer installed, there are no significant differences. Has anyone experienced anything similar? Could anyone suggest where I might look next? Thanks, BLC SoCal# use Cwd; chdir 'c:\temp\ldif'; print "\ncd=" . `cd`; print "\ngetcwd=" . getcwd(); #
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: cd pwd dir chdir version default directory
by graff (Chancellor) on Dec 04, 2007 at 00:34 UTC | |
by blc3355447 (Novice) on Dec 04, 2007 at 00:58 UTC | |
by eyepopslikeamosquito (Archbishop) on Dec 04, 2007 at 03:41 UTC | |
by halley (Prior) on Dec 04, 2007 at 14:29 UTC |