Let's say you want to prompt a user for input, like this.
What is your name?
The following markup can be used to produce the prompt.
#!/usr/bin/perl use strict; use warnings; print "What is your name? \n"; my $name = <STDIN>; chomp $name;
In this example, whatever the user types at the prompt will be stored in a variable named $name. The $name variable can be printed to display the users name.
print "Your name is $name \n";