Correct Answer : Larry Wall
Explanation : In December 1987 American programmer and linguist Larry Wall first released Perl 1.0 for computers running the UNIX operating system.
Correct Answer : December 1987
Explanation : Perl was developed by Larry Wall in December 1987 as a general-purpose Unix scripting language to make report processing easier.
Correct Answer : Scalar
Correct Answer : Boolean
Explanation : Boolean context is simply any place where an expression is being evaluated
Correct Answer : join EXPR, LIST
Explanation : This function joins the separate strings of LIST into a single string with fields separated by the value of EXPR, and returns the string.
Correct Answer : getc
Explanation : The getc function returns a single character from the specified FILEHANDLE, or STDIN if none is specified.
Correct Answer : local
Explanation : The local is used when the current value of a variable must be visible to called subroutines.
Correct Answer : ->
Explanation : -> − The arrow operator is mostly used in dereferencing a method or variable from an object or a class name.
->
Correct Answer : q{ }
Explanation : q{ } − Encloses a string with-in single quotes.
q{ }
Correct Answer : keys
Explanation : keys − You can get a list of all of the keys from a hash by using keys function.
Correct Answer : **
Explanation : ** − Exponent − Performs exponential (power) calculation on operators.
**
Correct Answer : >
Explanation : > − Checks if the value of left operand is less than the value of right operand, if yes then condition becomes true.
>
Correct Answer : All of the above.
Correct Answer : _PACKAGE_
Explanation : _PACKAGE_ represents current package name.
Correct Answer : shift @ARRAY
Explanation : shift @ARRAY − Shifts the first value of the array off and returns it, shortening the array by 1 and moving everything down.
shift @ARRAY
Correct Answer : True
Explanation : Parameters can be acessed inside the function using the special array @_. Thus the first argument to the function is in $_[0], the second is in $_[1], and so on.
@_
$_[0]
$_[1]
Correct Answer : $ref = \%ENV;
Explanation : You can create a reference for any hash by prefixing it with a backslash as follows - $ref = \%ENV;
Correct Answer : goto EXPR
Explanation : The goto EXPR form is just a generalization of goto LABEL. It expects the expression to return a label name and then jumps to that labeled statement.
Correct Answer : Using scalar context
Explanation : You can get the size − that is, the number of elements from a hash by using the scalar context on either keys or values.
Correct Answer : perl
Explanation : A perl is the finest filter used on the UNIX system and is the finest of all (grep, sed, awk, tr). In fact, it combines the power of these. There is nothing can these filters can do and perl can’t.
Correct Answer : perl -e
Explanation : Unlike other filters, script errors are generated before the execution of perl script file. To check whether perl exist on our system or not use this simple command:
Correct Answer : .pl
Explanation : perl programs are often very big, hence it is better to use .pl extension with perl program files.
.pl
Correct Answer : \w
Explanation :
\s - a whitespace character \d - a digit \w - a word character
Correct Answer : tr and s
Explanation : The s and tr functions handle all substitutions in perl. The s command is used in same way as it was used in sed while tr is used translating the characters in the same way as the UNIX tr command does.
Correct Answer : reverse
$x= “abcd” ; print reverse($x) ; / prints dcba
Correct Answer : chop
Explanation : In many conditions, we may need to chop the last character –especially when there is a newline character. For this purpose, chop function is used.
Correct Answer : number
Explanation : There are some attributes which we should keep in mind while using perl. One of which is, when we use string for numerical comparison or computation, perl immediately converts it into a number.
Correct Answer : 0
Explanation : When a variable is undefined, it is assumed to be a NULL string and NULL string is numerically zero.
Correct Answer : .
$ perl -e '$x="FreeTime" ; $y="Learning" ; print($x . $y);' FreeTimeLearning
Correct Answer : x
print * 10 times;
$ perl -e ‘print “*” x 10 ;’ **********
Correct Answer : length
$x= “Srinivas”; print length($x); // prints 8
Correct Answer : substr
$x= “abcdefghijklm” $y= substr( $x, -3,2); // extracts two characters from the third position on the right side print “$y”; // prints kl
#begin #cut
=begin =cut
=start =end
Correct Answer : =begin =cut
Explaination :
Correct Answer : None of the above
C/C++
main ()
Correct Answer : package class_name
package class_name
Correct Answer : All of the above
Explanation : The constructor of a class is the first subroutine to be called when an object of that class is initiated.
Correct Answer : my object_name = new class_name()
my object_name = new class_name()
Correct Answer : Constant method
Explanation : Virtual methods and static methods are valid types of methods in Perl.
Correct Answer : Used for cleanup of reference of objects
Explanation : Destructors in Perl are called when the object goes out of scope. It is used to clean up the reference of the object.
Correct Answer : Filling up method with extra written data
Explanation : Method overwriting in Perl is a feature using which we can rewrite the method in child class.
Correct Answer : All of the Above
Correct Answer : Excel::Writer::XLSX
Excel :: Writer :: XLSX
Correct Answer : length()
Explanation : The length of string in Perl is calculated using length() method.
length()
Correct Answer : Check if the string to its left is stringwise less than string to its left
Explanation : The 'It' operator of string is used to check if the string to its left is stringwise less that string to its left.
Explanation : The == operation in Perl is not a valid comparison operator on strings.
%lang = ('Perl' => 4, 'Python' => 2, 'Javascript' => 5); @arr = values %lang; print @arr
Correct Answer : 425
Correct Answer : Set of key-value pair
Explanation : Hash in Perl is a set of key-value pairs.
set of key-value pairs
Correct Answer : $size = scalar @array_name
$size = scalar @array_name
Correct Answer : last
Explanation : The last keyword in Perl can make the current iteration of the loop the last one.
Correct Answer : Jump the flow to the given label skipping the current block execution
Explanation : The redo operator is used to Jump the flow to the given label skipping the current block execution.
redo
Correct Answer : Jump from anywhere to anywhere within the block
Explanation : The goto statement in Perl is used to jump from anywhere to anywhere with the block of code.
Correct Answer : Multiway branch statement
Explanation : Given-when in Perl is a multiway branch statement.
$a = 8; until ($a <= 7){ print "Value of a = $a\n"; $a = $a - 1; }
Correct Answer : Value of a = 8
Explanation : Valid loops in Perl are for, foreach, while, do while, until, nested loop.
Correct Answer : elsif statement along with unless
Explanation : unless elsif statement has elseif statement working with unless.
Correct Answer : STandarD INput
Correct Answer : say()
Explanation : The say() method is used to display expressions in Perl. It automatically adds the end of line after print.
say()
Correct Answer : return value at the end of subroutines
Explanation : The return() function in Perl is used to return values at the end of subroutines.
return()
Correct Answer : Trait
Explanation : Trait is a built-in subroutine which is used inside the method.
Correct Answer : Values that cannot be modified within the function
Explanation : Immutable parameters in Perl are values that cannot be modified within the function.
Correct Answer : Array
Correct Answer : sub function_name{ }
sub function_name{}
Explanation : A group of statements that perform a specific task is known as function or subroutine or method.
Correct Answer : rmdir
Explanation : In Perl, rmdir is used to delete a directory.
rmdir
Correct Answer : Change directory
Explanation : The chdir() function used to change the current directory in Perl.
chdir()
Correct Answer : A place to store values in the form of a list
Explanation : In Perl, Directory is a place to store values in the form of a list.
Correct Answer : %x
Explanation : The "%x" character sequence is used to print the number's hexadecimal conversion.
%x
Correct Answer : use module_name
Explanation : The "use" keyword in Perl is used to import a module in Perl.
Correct Answer : Create an alias to package
Explanation : The "Our" keyword is used to create an alias to package.
Our
Correct Answer : Inside any function or block
Explanation : Global scoped variable is declared outside all blocks of code. The scope of this variable inside any function or block.
Correct Answer : A Single unit of data
Explanation : Scalar variables in Perl are a single unit of data. Different types of scalars in Perl are string, character, floating point, large group of string, webpage, etc.
Correct Answer : Integer
Correct Answer : When a class inherits more than two classes
Explanation : In multiple inheritance, one class inherits more than two classes in Perl.
Correct Answer : A subclass of a class is inherited by another class
Explanation : In multilevel inheritance, a subclass of a class is inherited by another class in Perl.
Explanation : Polymorphism in Perl is defining multiple methods under the same name.
Correct Answer : Wrapping up data and related methods to a single unit
Explanation : Encapsulation is wrapping up data and related methods to a single unit in Perl.
Correct Answer : Data hiding
Explanation : Data hiding in Perl is also known as Encapsulation.
Correct Answer : use strict;
Correct Answer : Used to combine conditions
Explanation : Logical operators in Perl are used to combine multiple conditions.
100 << 3
Correct Answer : 800
<<
Correct Answer : ==
=
+=
%=
$val1 = 5; $val2 = 10; $result = $val1 == $val2 ? $val1 : $val2; print "$result"
Correct Answer : 10
Correct Answer : Repeat the given string multiple times
Explanation : The "x" operator in Perl strings is used to repeat the given string multiple times.
Correct Answer : Operators on the list of operators
Explanation : Listary operator is an operator that operates on a list of operands.
&& , &, = , ->
-> , & , && , =
= , & , && , ->
= , -> , && , &
& , && , = , ->
Correct Answer : -> , & , && , =
Correct Answer : Assignment Operator
Explanation : "+=" known as "Assignment operator" in Perl.
Correct Answer : (x)