Updated: 11/13/2018 by Computer Hope

standard inputShort for standard input, stdin is an input stream where data is sent to and read by a program. It is typically used in Unix operating systems and with certain programming languages such as C, Perl, and Java. Below, is an example of how STDIN could be used in Perl.

print "Type something: ";
my $example = <STDIN>;
print "\nYou typed: $example\n";

In the example above, when ran the script would ask you to type something. Whatever is typed is saved in the $example variable and then printed as "You typed: xxxx," where xxxx is what is saved in the variable.

Computer abbreviations, Input, Programming terms, Stdout