in reply to Getting user input
The following script will prompt for and take user input via STDIN, place it in a variable named $input, strip away the trailing newline, and will print what the user typed in, to STDOUT.
#!/usr/bin/perl use strict; use warnings; print "Enter your input:\n"; my $input = <STDIN>; chomp $input; print "You typed: $input\n";
Dave
|
|---|