1.
What is the value of $txt in the following Perl code:
my $txt = 'I am learning Perl';

$txt = ~/(w+)$/;
2.
In Perl, the following operation collapses all the duplicate spaces that are present in the string, $str, into a single space:
$str = ~s / s + / /;
3.
In Perl, which of the following data types is valid?
4.
In Perl, which of the following statements about Use and Require is true:
1. Both the statements are used to import modules.
2. Require statements import functions only within their packages.
3. Use statements import functions with a global scope.
4. Require statements are interpreted and executed during parsing.
5. Require statements are executed during runtime.
5.
In Perl, are single and double quotes identical?
6.
In Perl, which of the following is used to concatenate strings?
7.
In Perl, which of the following is used to read command line arguments?
8.
In Perl, what is a regular expression?
9.
In Perl, what is CPAN?
10.
What is the output of the following Perl code:
$p1 = "prog1.java";
$p1 = ~s / (.*).java / $1.cpp / ;
print "$p1
";