You can use the special for standard input anywhere and anyway
you would use a normal scalar.
The special symbol for standard input is
<STDIN>.
Basically, unless the user deliberately overrides it,
<STDIN> gets what the user types.
For most operating systems, <STDIN> will
have a newline tacked on to the end of it.
If a pipe has been closed, <STDIN> will
return undef .
unless the user deliberately overrides it, <STDIN>
will pick up a line of text at a time. That is, the user will
type in characters, and when they hit return Perl will get the
complete line (with newline) in it's entirety.
Perl was designed to allow you to use an assignment expression
interchangebly with a variable, so you can get away with the following
handy shorthand (and you will likely see it often).