Game of life in perl