perlquestion
mvaline
I've got a little backup script running on Windows NT in which I call the InfoZIP zip program using the following construction:
<code>system("zip -rq $target $project_root") or die "couldn't exec zip: $!";</code>
The creation of the zip file occurs correctly, but I always get the die message.
I ran the following code as a test and verified that the return value was zero:
<code>$test = system("zip x:\\test.zip x:\\test.txt");
print $test;</code>
I checked the Camel Book, and sure enough, the or die construction executes the die portion if the left side is false. I guess I could be losing my memory, but I thought that normally executing programs return 0 to signify a normal exit. I use the <code>or die</code> construction all the time.
At any rate, should I go ahead with something like <code>not system("zip -rq $target $project_root") or die "couldn't exec zip: $!";</code> or is there something I'm not seeing here.