Had to add 'sleep' to perl script. Otherwise the loop spins like mad.