I've got a little backup script running on Windows NT in which I call the InfoZIP zip program using the following construction:
system("zip -rq $target $project_root") or die "couldn't exec zip: $!";
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:
$test = system("zip x:\\test.zip x:\\test.txt");
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 or die
construction all the time.
At any rate, should I go ahead with something like not system("zip -rq $target $project_root") or die "couldn't exec zip: $!";
or is there something I'm not seeing here.