http://www.perlmonks.org?node_id=201820


in reply to Conway's Game of Life

The terminal emulator works with "control characters"

You have to  print the output of the "clear" command, so that the terminal emulator "see" the control chars:

 print `clear`;  # this should clear the screen