I don't want it to exit from the loop, when I say it just hangs I mean it doesn't execute any other code, it just seems to go straight to the sleep function and stay there. I want the prog to loop indefinitely until it is killed by the user.
i.e:
while (1) {
if($cond = 1){ print "1"; }
else{ print "2"; }
sleep 10
}
it doesn't do the conditional statements (just eg's) or any other statements in the prog, it just hangs on the cmd line:
./prog.pl
Huh ?