Perl is one of the most used scripting language. Often there is a need to perform certain operations based on user input. Here is the code snippet how to take input from user in perl:
print "Enter your name: \n";
print "\n Hello $name. Welcome to PERL..!! \n";
Let say user provides the input as “David”, output of the above code snippet would be:
Enter your name:
Hello David. Welcome to Perl..!!