aarh perl needs blocks after if; changed to unless