simplify perl boolean conversion