Only a remark: on windows be very carefull mixing the Perl's idea of cwd with the OS's one.
Given you have a drive y: can you predicdt the output of the following command?
;=)
c:\path> y: & cd c:\ & dir c: & cd c:\Windows & dir c: & dir \
L*
There are no rules, there are no thumbs..
Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.