On Windows you could do $pwd = `CD` infact
/J\
In reply to Re^3: Current working directory on win32 by gellyfish in thread Current working directory on win32 by kamesh3183