One more thing, make sure you flush the output buffer before you do the clear call, I don't know exacltly how to do it off the top of my head, but if you have
print "hi";
system("clear"
;
print "hi again";
due to buffering, you may see
hihiagain
instead of
hiagain
This is because when you do a print statement, it is buffered, not immediatly outputted to the screen. If this is an issue, post it and I'll find an example of flushing the buffer.
print "hi";
system("clear"
print "hi again";
due to buffering, you may see
hihiagain
instead of
hiagain
This is because when you do a print statement, it is buffered, not immediatly outputted to the screen. If this is an issue, post it and I'll find an example of flushing the buffer.