in reply to Safe to run a constant loop?

I think it is definately alright to run constant codes, I have done it alot in the past with like daemons listening on sockets and forking processes to handle clients. I tend to use something more like this :
while (1) { opendir (DIR, $watcheddir); @files=grep {!/^\./} readdir (DIR); closedir DIR; foreach $currentfile (@files) { &filecontents; } }
really no need to use the sleep. and GOTO's should be gone with QBASIC :). Something as simple as this, don't worry about CPU usage, I would be ammused to see if this even sparked a blip on the "top" radar. tradez