perl solution #20