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 print "What is your name? \n"; my $name = <STDIN>;
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";
The $name variable may contain new lines, thus it's good practice to use chomp to remove new lines.