Perl: Reading Input Into an Array
Reading Input Into an Array
To get input from a user we can use the <STDIN> filehandle
When assigned as a array, all lines are read until the user presses Ctrl-D
@a = <STDIN> # @a will contain each line the user types
chomp(@a); # get rid of the newlines