in reply to hiding input

If you are working on UNIX platform, this is an easier task. Use optionally echoing of input facility of UNIX. Try this :
printf("Enter word :"); chomp($visible_word = <STDIN>>); #### you can see what you are typin +g ... printf("\n"); system("stty -echo"); chomp($passwd = <STDIN>); #### this won't be visible on screen ... printf("\n"); system("stty echo");