Perl functions generally return true on success, but system() returns the system exit status, which is inverted. Your workaround is correct. Another clean but unintuitive way is:
system("zip -rq $target $project_root") and die "couldn't exec zip: $!";
After Compline,
Zaxo
In reply to Re: Handling weird return values with or die
by Zaxo
in thread Handling weird return values with or die
by mvaline
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |