The stupid question is the question not asked | |
PerlMonks |
Re: Handling weird return values with or dieby Zaxo (Archbishop) |
on Jul 05, 2001 at 16:36 UTC ( [id://94074]=note: print w/replies, xml ) | Need Help?? |
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,
In Section
Seekers of Perl Wisdom
|
|