How can I test the return value if the system built in function? I tried the following:
I croak every time even though the syscall is successful because I see the uotput in the console and got a return 0 when I checked the value of $CHILD_ERROR or $?.
system 'command' or croak "Command failed";
FYI, I have a working script and am working on best practices. I'm getting errors from Critic for ignoring the return values of built ins like system and CHDIR. Just trying to learn the best way to handle this.