Heh... usually we have to ask people: What do you mean when you say "it doesn't work"? But in your case, I have to ask: What do you mean when you say "it works"? | [reply] |
That should never work (update; or at least do anything useful). What system is that?
| [reply] |
Actually, no, architecturally it shouldn't even work on MS-DOS from version 2.0 on. (Earlier 1.0 and 1.1 didn't implement subdirectories.) Of course, I don't know how far back we see any build of Perl for MS-DOS.
Each system() call with spaces in it results in a new instance of COMMAND.COM (or in NT-speak, CMD.EXE). It is that interpreter which takes the single string and parses it into execution. Perl wouldn't pass the "cd foo" string to perl's parent interpreter, and there is no cd.exe, so this is how it has to happen. Anything under that instance of the command interpreter has one "active directory" for each lettered device. This is lost when the command shell quits.
In Un*x, a process only sees the filesystem world as a single root, instead of several distinct lettered devices, and each process has its own current directory relative to that root.
-- [ e d @ h a l l e y . c c ]
| [reply] [d/l] [select] |