Example of the Perl Code
#!/usr/bin/perl
use strict;
use warnings;
# Prompt the user for their name
print "Enter your name: ";
my $name = <STDIN>; # Read user input
# Remove trailing newline characters
chomp $name;
# Print a personalized greeting
print "Hello, $name! Welcome to Perl.\n";
Output:
Enter your name:
Geek
Hello, Geek! Welcome to Pearl.
Contact Us