How to read a password on the command line?
Installing and getting started with Perl
Open and read from text files
Prompt, read from STDIN, read from the keyboard in Perl
STDIN in scalar and list context
How to provide STDIN to an external executable?