On 8/23/05, I wrote:
> I adopted the Zcode interpreter that leo posted in February. 
> 
> The only bad news is there's something wrong with my make test.
> I managed to narrow this down to a very
> weird Perl behavior I don't understand at all:
> 
> testportal:~>mkdir z
> testportal:~>cd z
> testportal:~/z>mkdir y
> testportal:~/z>touch y/foo
> testportal:~/z>perl -we 'system("cd y")'
> Can't exec "cd": No such file or directory at -e line 1.
> testportal:~/z>perl -we 'system("cd y && ls")'
> foo

Several people pointed out that I didn't perldoc -f system. Sorry! 
Btw, even after reading the docs, I still don't understand why Perl
would pass a cd command to a piece of the shell that can't understand
it. Granted, I shouldn't do it anyway, because then Perl will exit the
shell it created for the system() and my cd will be useless.

I changed my tests to chdir to the right directory before doing
anything, and now it seems to work no matter where you run it.

So now, v0.2 can officially be released. Hooray!

-Amir

Reply via email to