in reply to kbhit equivalent

It doesn't appear actually be actually be part of C. Either way, I think you want Term::ReadKey