in reply to [SOLVED] Capture the make status
At the end of the block, the working directory will snap back to what it was before. If the directory cannot be changed, it throws an exception. runx as shown will throw an exception if the return code is not 0.use File::chdir qw($CWD); use IPC::System::Simple qw(runx); { local $CWD = '...'; runx [0], 'make', 'this'; }
|
|---|