Aaaah - sorry! Now I realize your command line, and where that behaviour stems from.
You are not passing a single command to system() but a string containing ";" which will be interpreted by the shell instead of directly started. You get back the exit status of the shell, which (likely) is the exit status of the last command run, which is cd ...
I recommend you do the chdir in Perl and run only make ... directly via system().
|