in reply to Re: Capture the make status
in thread [SOLVED] Capture the make status

well then i am doing something else wrong because when i induce an error my system returns 0 as if everything is ok...

Replies are listed 'Best First'.
Re^3: Capture the make status
by Corion (Patriarch) on Aug 26, 2013 at 13:24 UTC

    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().