Hello by [ Perl ], also print & qw()
Posted: Sun Dec 08, 2024 8:42 pm
First, we created the first.pl file. We saved it to the Home folder in Ubuntu, and its content was as follows.
The expected output will be as follows. :
In the qw() function, each element separated by a space completes the character sequence that comes before it by repeating it. "\n" is the escape string used to enter a new line.
HELLO PERL
Code: Select all
$p = "Ben Perl, inci\n";
print $p;
print "Hello $_!\n" for qw(Hello world baraq web);
Ben Perl, inci
Hello Hello!
Hello world!
Hello baraq!
Hello web!
In the qw() function, each element separated by a space completes the character sequence that comes before it by repeating it. "\n" is the escape string used to enter a new line.
HELLO PERL