in reply to Simple Logic Problem with Perl

I am sorry for my English, but I am not able to understand your output conditions.