open(DATA, "+
None of the above
Answer
Correct Answer:
open(DATA, "+
Note: This Question is unanswered, help us to find answer for this one
Check Answer
97. What are the data types available in Perl language?
Scalars
Arrays
hashes
All of the above
Answer
Correct Answer:
All of the above
Note: This Question is unanswered, help us to find answer for this one
Check Answer
98. Is a continue block executed if a redo statement restarts the loop? (choose all that apply)
Yes
No
The continue block is executed only when an iteration of a loop is successfully completed
All of the above
Answer
Correct Answer:
No The continue block is executed only when an iteration of a loop is successfully completed
Note: This question has more than 1 correct answers
Note: This Question is unanswered, help us to find answer for this one
Check Answer
99. What are the logical operators in Perl?
Operator Operationa ||, and logical and &&, or logical and !, not logical not
Operator Operation ||, or logical or &&, and logical and !, not logical not
Operator Operation &&, or logical or &&, and logical and !, or logical or
Operator Operation, or logical or &&, and logical and !, not logical not
Answer
Correct Answer:
Operator Operation ||, or logical or &&, and logical and !, not logical not
Note: This Question is unanswered, help us to find answer for this one
Check Answer
100. Which of the following is true about dereferencing?
Dereferencing returns the value from a reference point to the location
To dereference a reference simply use $, @ or % as prefix of the reference variable depending on whether the reference is pointing to a scalar, array, or hash
Both of the above
None of the above
Answer
Correct Answer:
Both of the above
Note: This Question is unanswered, help us to find answer for this one
Check Answer
101. In Perl, a floating-point scalar value consists of the following? (check all that apply)
A sequence of digits, optionally containing a decimal point
An optional exponent
An optional minus/plus/integer sign
None of the above
Answer
Correct Answer:
A sequence of digits, optionally containing a decimal point An optional exponent
Note: This question has more than 1 correct answers
Note: This Question is unanswered, help us to find answer for this one
Check Answer
102. Define a sample perl hash of arrays using the following code?
%tgs = array(
'top 5' => [ 'Best linux OS', 'Best System Monitoring', 'Best Linux Text editors' ],
'15 example' => [ 'rpm command', 'crontab command', 'Yum command', 'grep command' ],
);
$tgs = array(
'top 5' => [ 'Best linux OS', 'Best System Monitoring', 'Best Linux Text editors' ],
'15 example' => [ 'rpm command', 'crontab command', 'Yum command', 'grep command' ],
);
%tgs = (
'top 5' => [ 'Best linux OS', 'Best System Monitoring', 'Best Linux Text editors' ],
'15 example' => [ 'rpm command', 'crontab command', 'Yum command', 'grep command' ],
);
$tgs = (
'top 5' => [ 'Best linux OS', 'Best System Monitoring', 'Best Linux Text editors' ],
'15 example' => [ 'rpm command', 'crontab command', 'Yum command', 'grep command' ],
);
Answer
Correct Answer:
%tgs = (
'top 5' => [ 'Best linux OS', 'Best System Monitoring', 'Best Linux Text editors' ],
'15 example' => [ 'rpm command', 'crontab command', 'Yum command', 'grep command' ],
);
Note: This Question is unanswered, help us to find answer for this one
Check Answer
103. State variables maintain their state and they do not get _____ upon multiple calls of the subroutines?
Reinitialized
Initialized
Debugging
Restart
Answer
Correct Answer:
Reinitialized
Note: This Question is unanswered, help us to find answer for this one
Check Answer
104. Which of the following are special file handles?
STDIN
STDOUT
STDERR
ARG
All of the above
Answer
Correct Answer:
STDIN STDOUT STDERR
Note: This question has more than 1 correct answers
Note: This Question is unanswered, help us to find answer for this one
Check Answer
105. Perl supports ___ main loop types?
One
Two
Three
Four
Note: This Question is unanswered, help us to find answer for this one
Check Answer
106. Which operator encloses a string with-in single quotes?
q{ }
qq{ }
qx{ }
enclose{}
Note: This Question is unanswered, help us to find answer for this one
Check Answer
107. Arrays are denoted by _____ in Perl?
!
*
@
#
Note: This Question is unanswered, help us to find answer for this one
Check Answer
108. Which of the following is breaking out of loops? (check all that apply)
next
last
redo
undo
All of the above
Answer
Correct Answer:
next last redo
Note: This question has more than 1 correct answers
Note: This Question is unanswered, help us to find answer for this one
Check Answer
109. What is the purpose of close() function?
To flush the filehandler's buffers and close the system's file descriptor
The close function returns a single character from the specified FILEHANDLE, or STDIN if none is specified
The close function reads a block of information from the buffered filehandle: This function is used to read binary data from the file
All of the above
Answer
Correct Answer:
To flush the filehandler's buffers and close the system's file descriptor
Note: This Question is unanswered, help us to find answer for this one
Check Answer
110. Perl package manager is the ActiveState tool for precompiled perl ................
Modules
Classes
Functions
Files
Note: This Question is unanswered, help us to find answer for this one
Check Answer
111. If the file is opened for write or append, you can write to the filehandle using which print function?
open (my $fh, '>output.txt');
print $fh
open (my $fh, '>output.txt');
print $fhg
close (my $fh, '>output.txt');print $fh
Answer
Correct Answer:
open (my $fh, '>output.txt');
print $fh
Note: This Question is unanswered, help us to find answer for this one
Check Answer
112. Which statement restarts the loop block without evaluating the conditional again?
next
last
continue
Redo
Note: This Question is unanswered, help us to find answer for this one
Check Answer
113. In order to "store" an operator inside a variable in Perl, you would use:
$a = if( odd($a. $b)){ print "ok"; } ">
$a = if( eval($a + $b)){ print "ok"; } ">
$a = if( eval($a. $b)){ print "ok"; ">
$a = if( eval($a. $b)){ print "ok"; ">
Answer
Correct Answer:
$a = if( eval($a. $b)){ print "ok"; ">
Note: This Question is unanswered, help us to find answer for this one
Check Answer
114. What is STDERR?
STDERR: It is a standard error stream that is used in Perl
STDERR: It is used to write into the screen or another program
STDERR: The STDERR file handle is used to read from the keyboard
All of the above
Answer
Correct Answer:
STDERR: It is a standard error stream that is used in Perl
Note: This Question is unanswered, help us to find answer for this one
Check Answer
115. Which are types of Perl variables?
Hash Variables %
Array variables @
Scalar variables $
None of the above
Answer
Correct Answer:
Hash Variables % Array variables @ Scalar variables $
Note: This question has more than 1 correct answers
Note: This Question is unanswered, help us to find answer for this one
Check Answer
116. A compound statement usually contains?
Block defines a scope
Labels
Conditional constructions and blocks
All of the above
Answer
Correct Answer:
All of the above
Note: This Question is unanswered, help us to find answer for this one
Check Answer
117. The Perl interpreter keeps track of the length of a _____ as well as its contents?
Data
String
Array
Object
Note: This Question is unanswered, help us to find answer for this one
Check Answer
118. What is the result of the following code?
$pvt = Calculation(6,4,8,12);
print("Result = $pvt\n");
sub Calculation{
my ($fstVar, $secndVar) = @_;
my $square = sub{
return($_[0] ** 2);
};
return(&$square($fstVar) + &$square($secndVar));
};
Answer
Correct Answer:
Result = 52
Note: This Question is unanswered, help us to find answer for this one
Check Answer
119. Which of the following commands typically use AutoSplit by the MakeMaker utility?
perl -MAutoSplit -e 'autosplit($ARGV[0], $ARGV[1], 0, 1, 1)'
perl -AutoSplit -a 'autosplit($ARGV[0], $ARGV[1], 0, 0, 1)'
perl -AutoSplit -e 'mautosplit($ARGV[1], $ARGV[1], 0, 1, 1)'
perl -MAutoSplit -e 'mautosplit($ARGV[1], $ARGV[0], 0, 0, 1)'
Answer
Correct Answer:
perl -MAutoSplit -e 'autosplit($ARGV[0], $ARGV[1], 0, 1, 1)'
Note: This Question is unanswered, help us to find answer for this one
Check Answer
120. A library is a set of ___ for a particular purpose?
subroutines
analogous
function
program
Answer
Correct Answer:
subroutines
Note: This Question is unanswered, help us to find answer for this one
Check Answer
121. What will be printed by the code below?
my @a = (0, 1, 2);
my $b = @a;
print $b;
Note: This Question is unanswered, help us to find answer for this one
Check Answer
122. Which of the following data types are supported in Perl?
Scalar
Array
Hashes
All of the above
Answer
Correct Answer:
All of the above
Note: This Question is unanswered, help us to find answer for this one
Check Answer
123. What is the default scope of perl variables?
global
private
protected
friend
Note: This Question is unanswered, help us to find answer for this one
Check Answer
124. Which of the following Library Modules are available in Perl? Check all that apply.
Do
Imports
Package
Required
All of the above
Answer
Correct Answer:
Do Package
Note: This question has more than 1 correct answers
Note: This Question is unanswered, help us to find answer for this one
Check Answer
125. What value do variables have before they are first assigned?
undef
null
0
nil
Note: This Question is unanswered, help us to find answer for this one
Check Answer
126. Which of the following special variable represents current line number?
LINE
Line
_LINE_
None of the above.
Note: This Question is unanswered, help us to find answer for this one
Check Answer
127. What is a true statement in regards to the benefits of Perl programming when using it in web based applications?
Perl does not have a rapid development cycle.
Perl cannot handle encrypted Web data, including e-commerce transactions.
Perl's DBI package makes web-database integration easy.
None of the above
Answer
Correct Answer:
Perl's DBI package makes web-database integration easy.
Note: This Question is unanswered, help us to find answer for this one
Check Answer
128. What is Perl?
Practice for Exclusive and Report Language
Practical Extraction and Report Language
Practical Extraction and Report Learning
Practical Exclusive and Report Language
Answer
Correct Answer:
Practical Extraction and Report Language
Note: This Question is unanswered, help us to find answer for this one
Check Answer
129. Which of the following statements are correct about Default ?
Default defines a block that is executed when no blocks match
Default block is optional
Default defines a block that is executed if blocks match
None of the above
Answer
Correct Answer:
Default defines a block that is executed when no blocks match Default block is optional
Note: This question has more than 1 correct answers
Note: This Question is unanswered, help us to find answer for this one
Check Answer
130. Perl effectively inserts a call to the _____ DB::DB(linenum) in front of every place that can have a breakpoint?
Function
Array
Object
Namespace
Note: This Question is unanswered, help us to find answer for this one
Check Answer
131. Explain what is STDIN?
It is used to write into the screen or another program
The file handle is used to read from the keyboard
It is also used to write into a screen
None of the above
Answer
Correct Answer:
The file handle is used to read from the keyboard
Note: This Question is unanswered, help us to find answer for this one
Check Answer
132. Perl's text-handling capabilities can be used for generating mySQL queries ____ hashes, and automatic momory management?
arrays
data
json
files
Note: This Question is unanswered, help us to find answer for this one
Check Answer
133. How many operands are used in a conditional operator? (also called a trinary operator)
One
Two
Three
Four
Note: This Question is unanswered, help us to find answer for this one
Check Answer
134. The overload module provides the following public functions?
overload::StrVal(arg)
overload::Overloaded(arg)
overload::Method(obj, op)
All of the above
Answer
Correct Answer:
All of the above
Note: This Question is unanswered, help us to find answer for this one
Check Answer
135. What will be the output of the following code snippet?
sub skipper_greets {
my $person = shift;
print "Skipper: Hi there, $Perl!\n";
}
sub gilligan_greets {
my $person = shift;
if ($person eq "Skipper") {
print "Master: Sir, yes, $Perl!\n"; } else {
print "Master: Hi, $Perl!\n"; }
}
skipper_greets("Master"); gilligan_greets("Skipper");
Skipper: Hi there, !
Master: Sir, yes, !
Master: Hi there, !
Skipper: Sir, yes,Perl !
Skipper: Hi there, Perl !
Master: Sir, yes,!
Skipper: Hi there, yes!
Master: Sir, yes,Perl !
Answer
Correct Answer:
Skipper: Hi there, !
Master: Sir, yes, !
Note: This Question is unanswered, help us to find answer for this one
Check Answer
136. Which of the following correctly describes Array data types in Perl?
hese are simple variables. They are preceded by a dollar sign ($).
These are ordered lists of scalars that you access with a numeric index which starts with 0.
These are unordered sets of key/value pairs that you access using the keys as subscripts.
None of the above.
Answer
Correct Answer:
These are ordered lists of scalars that you access with a numeric index which starts with 0.
Note: This Question is unanswered, help us to find answer for this one
Check Answer
137. CPAN stands for comprehensive Perl archive Network and its a collections of Perl?
Modules
Framework
Tool
Library
Note: This Question is unanswered, help us to find answer for this one
Check Answer
138. Which of the following are Classes and Objects in Perl?
Blessd
Dbmclose
Dbmopen
Tieded
Answer
Correct Answer:
Dbmclose Dbmopen
Note: This question has more than 1 correct answers
Note: This Question is unanswered, help us to find answer for this one
Check Answer
139. What do the Relevant library modules include? (check all that apply)
GDBM_File
NDBM_File
ODBM_File
SDBM_File
All of the above
Answer
Correct Answer:
All of the above
Note: This Question is unanswered, help us to find answer for this one
Check Answer
140. Which operator immediately ends execution of the loop?
next
last
redo
Leave
Note: This Question is unanswered, help us to find answer for this one
Check Answer
141. Which of the following command line arguments are stored and how would you read command-line arguments with Perl?
$ARGV[0]
$ARGV[1]
$#ARGV is the subscript of the last element of the @ARGV array, so the number of arguments on the command line is $#ARGV + 1
All of the above
Answer
Correct Answer:
All of the above
Note: This Question is unanswered, help us to find answer for this one
Check Answer
142. Which of the following statements is correct about Hash Functions?
keys returns a list of all the keys in a hash
values returns a list of all the values in a hash
delete removes a key/value pair from a hash
All of the above
Answer
Correct Answer:
All of the above
Note: This Question is unanswered, help us to find answer for this one
Check Answer
143. What is the purpose of using the FILE literal?
It is used to get the current line number.
It is used to get the current file name.
It is used to get the current package name.
All of the above
Answer
Correct Answer:
It is used to get the current file name.
Note: This Question is unanswered, help us to find answer for this one
Check Answer
144. Which function opens a file in writing mode after truncating the file?
open(DATA,
open(DATA,
open(DATA,
None of the above.
Answer
Correct Answer:
open(DATA,
Note: This Question is unanswered, help us to find answer for this one
Check Answer
145. Which of the following supports FileHandle methods that correspond to Perl special variables?
clearer_getc
autoflush_close
format_line_break_characters
input_record_separator
output_field_separator
Answer
Correct Answer:
clearer_getc format_line_break_characters
Note: This question has more than 1 correct answers
Note: This Question is unanswered, help us to find answer for this one
Check Answer
146. Rather than using print, what is often used in Perl when formatting is important?
printf
format
align
show
Note: This Question is unanswered, help us to find answer for this one
Check Answer
147. Tk support keeps the event loop of Tk __ while reading the prompt.
running
debugging
close
initialized
Note: This Question is unanswered, help us to find answer for this one
Check Answer
148. Which option would you use to stitch a list of strings into a single string?
my $string = join( 'apples' + 'bananas' + 'peaches'); warn "string is '$strings'"; > string is 'apples and bananas and peaches'... ">
my $string = addjoin( 'apples', 'bananas', 'peaches'); warn "string is '$string'"; > string is 'apples and bananas and peaches'... ">
my $string = join( 'apples', 'bananas', 'peaches'); warn "string is '$string'"; > string is 'apples and bananas and peaches'... ">
Answer
Correct Answer:
my $string = join( 'apples', 'bananas', 'peaches'); warn "string is '$string'"; > string is 'apples and bananas and peaches'... ">
Note: This Question is unanswered, help us to find answer for this one
Check Answer
149. Which operator can be used to take the bottom item from an array?
Pop
push
pull
plant
Note: This Question is unanswered, help us to find answer for this one
Check Answer
150. What is the purpose of the -w switch in Perl?
The -w switch tells perl to produce extra warning messages about potentially dangerous constructs
The -w switch tells perl to produce back warning messages about potentially dangerous constructs
The -w switch tells perl to produce last warning messages about potentially dangerous constructs
All of the above
Answer
Correct Answer:
The -w switch tells perl to produce extra warning messages about potentially dangerous constructs
Note: This Question is unanswered, help us to find answer for this one
Check Answer
151. Which function renames an existing file?
rename
tell
seek
None of the above
Note: This Question is unanswered, help us to find answer for this one
Check Answer
152. What is the following code output? (check all that apply)foreach my $operator ( qw(+ − * /) ) { my $result = eval '2 $operator 2'; print '2 $operator 2 is $result\n';
Answer
Correct Answer:
2 + 2 is 4
2 − 2 is
2 * 2 is 4
Note: This question has more than 1 correct answers
Note: This Question is unanswered, help us to find answer for this one
Check Answer
153. How do I replace every TAB character in a file with a comma?
perl -pi.bak -e 's/\t/,/\/g' myfile.txt
perl -pi.bak -e 's/\t/,/g' myfile.txt
perl -pi.bak -e 's/\t/,\/g' myfile.txt
All of the above
Answer
Correct Answer:
perl -pi.bak -e 's/\t/,/g' myfile.txt
Note: This Question is unanswered, help us to find answer for this one
Check Answer
154. The "%" operator returns?
The larger of two numbers e.g. 200 % 20 would return 200
A percentage of a number e.g. 200 % 20 would return 40
The remainder when one number is divided by another
The remainder when one number is divided by another e.g. 18 % 7 would return 5
Answer
Correct Answer:
The remainder when one number is divided by another
Note: This Question is unanswered, help us to find answer for this one
Check Answer
155. Which of the following are Basic Input and Output Functions in Perl?
close, which terminates file access
print, which writes a string to a file
write, which writes information to a file using a print format
printf, which formats a string and sends it to a file
All of the above
Answer
Correct Answer:
All of the above
Note: This Question is unanswered, help us to find answer for this one
Check Answer
156. What does PrintRet do?
Enables printing of return value after r command
Enables printing messages on entry and exit from subroutines
Enables printing program to use for output of pager-piped commands
None of the above
Answer
Correct Answer:
Enables printing of return value after r command
Note: This Question is unanswered, help us to find answer for this one
Check Answer
157. Which control structure can be used to execute only when a condition is false?
until
unless
while
without
Note: This Question is unanswered, help us to find answer for this one
Check Answer
158. Which of the following variable contexts do not care what the return value is?
Scalar
List
Boolean
Void
Note: This Question is unanswered, help us to find answer for this one
Check Answer
159. Which of the following characters denotes a comment in Perl?
//
#
/*
&
*
Note: This Question is unanswered, help us to find answer for this one
Check Answer
160. Which of the following can be used with the do statement?
A label modifier
next
while
redo
last
Note: This Question is unanswered, help us to find answer for this one
Check Answer
161. Non-associative operators are those that.
do not bind at all
change their associativity depending on the context
do not show precedence
bind themselves to whichever expression they are adjacent to
do not associate the lvalue with the expression on the right
Answer
Correct Answer:
bind themselves to whichever expression they are adjacent to
Note: This Question is unanswered, help us to find answer for this one
Check Answer
162. How is an array assigned to an array?
@array1=@array[1...6];
@array1=@array2;
@array=(1, "string", 4,5, \@ array z);
By creating another array object
An array cannot be assigned to an array
Answer
Correct Answer:
@array1=@array2;
Note: This Question is unanswered, help us to find answer for this one
Check Answer
163. The s/// function.
substitutes one string for another string
returns the first position of a substring
returns the last position of a substring
returns the number of characters of a string
returns or modifies a substring
Answer
Correct Answer:
substitutes one string for another string
Note: This Question is unanswered, help us to find answer for this one
Check Answer
164. To start the Perl debugger, what will you type at the command prompt?
perldb
DB<1>
perl errorMessage.pl-d
perl -d filename.pl
perl-w programName.pl
Answer
Correct Answer:
perl -d filename.pl
Note: This Question is unanswered, help us to find answer for this one
Check Answer
165. What should be the first character of a format code?
+ or -
x
&
%
@
Note: This Question is unanswered, help us to find answer for this one
Check Answer
166. What does the following error indicate?
"Can't Locate Function in @INC"
You misspelled a function name
The last line of the required file returned a zero or null value
You forgot to type the comma after the first argument of a function
Your code is using a function that has been replaced by a newer function
You used an uninitialized value
Answer
Correct Answer:
You misspelled a function name
Note: This Question is unanswered, help us to find answer for this one
Check Answer
167. Which of the following operators has/have the highest precedence?
Increment/decrement
NOT, escape, sign operator
Dereference operator
Exponential operator
Parenthesis, function, quotation marks
Answer
Correct Answer:
Parenthesis, function, quotation marks
Note: This Question is unanswered, help us to find answer for this one
Check Answer
168. What does the directory function telldir do?
Changes the current directory
Closes a directory handle
Creates a new directory
Opens a directory handle
Gets a directory handle's current byte offset
Answer
Correct Answer:
Gets a directory handle's current byte offset
Note: This Question is unanswered, help us to find answer for this one
Check Answer
169. What is the following code an example of? $hitCounter=sub {print "This page has been called $hits times";};
Anonymous array
Anonymous hash
Object reference
Subroutine
Anonymous subroutine
Answer
Correct Answer:
Anonymous subroutine
Note: This Question is unanswered, help us to find answer for this one
Check Answer
170. What does the switch syntax :f do?
It allows the option to be negated
It sets the default syntax
It sets the input option to include an optional real-number argument
It sets the input option to include an optional integer argument
It sets the input option to include a mandatory real-number argument
Answer
Correct Answer:
It sets the input option to include an optional real-number argument
Note: This Question is unanswered, help us to find answer for this one
Check Answer
171. How many times does the do statement allow you to execute the block of statements in a loop?
Does not allow you to execute statements in a loop
At least once
Twice
Depends on the number of times specified
An indefinite number of times
Answer
Correct Answer:
At least once
Note: This Question is unanswered, help us to find answer for this one
Check Answer
172. Which of the following file functions gets the file descriptor of a file handle?
fcntl
flock
getc
fileno
Note: This Question is unanswered, help us to find answer for this one
Check Answer
173. What does the ord string function do?
Returns or modifies a sub string
Translates a number into a character
Creates a delineated string from an input list
Returns the number of characters in a string
Converts ASCII characters into their numeric value
Answer
Correct Answer:
Converts ASCII characters into their numeric value
Note: This Question is unanswered, help us to find answer for this one
Check Answer
174. Which one of the following is a part of the if family of branching statements in Perl?
if
if else
if elsif
if, if else, and if elsif
None of the above
Answer
Correct Answer:
if, if else, and if elsif
Note: This Question is unanswered, help us to find answer for this one
Check Answer
175. The syntax of the sort function without a special purpose sort subroutine is:
sort ( ) {$b cmp $a ;}
lvalue=sort list
$ name= ~tr/+/ /;
sortDescending ( ) {$b cmp $a;}
lvalue=sort subroutineName list;
Answer
Correct Answer:
sortDescending ( ) {$b cmp $a;}
Note: This Question is unanswered, help us to find answer for this one
Check Answer
176. The keyword 'my' is used to declare
comments
bare words
default variables
Lexical variables
Answer
Correct Answer:
Lexical variables
Note: This Question is unanswered, help us to find answer for this one
Check Answer
177. A directory handle.
is a program that handles your operating system
is a link from your computer program to the directory on your file system
does not have its own namespace
cannot be considered equivalent to a file handle
does not require the opendir function
Answer
Correct Answer:
is a link from your computer program to the directory on your file system
Note: This Question is unanswered, help us to find answer for this one
Check Answer
178. What does @ARGV refer to?
The number of elements in an array
An array loaded with the command-line arguments
A file handle used when processing an array
A file associated with a file handle
The name of your program
Answer
Correct Answer:
An array loaded with the command-line arguments
Note: This Question is unanswered, help us to find answer for this one
Check Answer
179. Which of the following operators is associated with writing to a program?
+
| filename
filename |
Answer
Correct Answer:
| filename
Note: This Question is unanswered, help us to find answer for this one
Check Answer
180. Which of the following can replace if else?
? :
: ?
! :
/ ?
? /
Note: This Question is unanswered, help us to find answer for this one
Check Answer
181. Which of the following characters is the variable designator for scalar variables?
@
%
$
*
Note: This Question is unanswered, help us to find answer for this one
Check Answer
182. Scalar variables can contain.
numeric data
string data
either numeric or string data
null values
Boolean values
Answer
Correct Answer:
either numeric or string data
Note: This Question is unanswered, help us to find answer for this one
Check Answer
183. Which of the following translation modifiers matches all characters that are not part of the search string?
d
s
c
x
z
Note: This Question is unanswered, help us to find answer for this one
Check Answer
184. What does a print FILEHANDLE list do?
Prints to FILEHANDLE the data in list
Prints the contents of the default special variable $_ to FILEHANDLE
Prints to the default selected file handle the data in list
Prints to the default selected file handle the contents of the default special variable $_
None of the above
Answer
Correct Answer:
Prints to FILEHANDLE the data in list
Note: This Question is unanswered, help us to find answer for this one
Check Answer
185. Which of the following Getopt::Long Configuration variables refers to an internal error flag?
debug
order
pass_through
null
error
Note: This Question is unanswered, help us to find answer for this one
Check Answer
186. What does the following syntax indicate? $lvalue=join(delimiter, list);
Creates a single delineated string from an input list
Translates a number into a character
Returns the first position of a substring
Returns the number of characters in a string
Returns the last position of a subst
Answer
Correct Answer:
Creates a single delineated string from an input list
Note: This Question is unanswered, help us to find answer for this one
Check Answer
187. How are hash references created?
% $ reference
$ reference = \ % hash;
@ reference = \ % hash;
% hash=$reference;
$$reference= \ % hash;
Answer
Correct Answer:
$ reference = \ % hash;
Note: This Question is unanswered, help us to find answer for this one
Check Answer
188. Which of the following pertains to IO: :Handle?
Base class for IO classes
Interface to file-open functions
Get the file descriptor
Interface to IO: : *classes
Export file symbols
Answer
Correct Answer:
Base class for IO classes
Note: This Question is unanswered, help us to find answer for this one
Check Answer
189. A label, in Perl, is.
a marker for the Perl interpreter
a heading
a switch statement
the name of an operator
a component embedded in the code
Answer
Correct Answer:
a marker for the Perl interpreter
Note: This Question is unanswered, help us to find answer for this one
Check Answer
190. What does the pop function do?
Takes elements off the end of an array
Puts elements into the first cell index of an array
Adds an element to the end of an array
Takes elements off the first index of the array
Modifies or deletes elements from the array
Answer
Correct Answer:
Takes elements off the end of an array
Note: This Question is unanswered, help us to find answer for this one
Check Answer
191. The foreach loop is usually used to process.
arrays and hashes
a block of statements a number of times
lists
multi-dimensional arrays
namespaces
Answer
Correct Answer:
arrays and hashes
Note: This Question is unanswered, help us to find answer for this one
Check Answer
192. Which of the following is not a feature of Perl?
Portability
Interpreted language
Compiled language
Is used for CGI applications
Was originally used to generate reports that tracked er
Answer
Correct Answer:
Compiled language
Note: This Question is unanswered, help us to find answer for this one
Check Answer
193. When are the environment variables created?
Each time you run a program
When you save a program
When you compile a program
The first time you run a program
When you run a program in the Unix command shell
Answer
Correct Answer:
Each time you run a program
Note: This Question is unanswered, help us to find answer for this one
Check Answer
194. Of which of the following switch syntax options is the following code an example of? GetOptions("extension:s");
Sets the default syntax
Allows the option to be negated
Sets the input option to include a mandatory string argument
Sets the input option to include a mandatory integer argument
Sets the input option to include an optional string argument
Answer
Correct Answer:
Sets the input option to include an optional string argument
Note: This Question is unanswered, help us to find answer for this one
Check Answer
195. What is meant by variable interpolation?
Exchanging the values of one variable with another
Passing a variable as an argument to a function
The process of making a variable part of the namespace table
The process of assigning some value to a variable
The process of interpreting characters in a string literal surrounded by double quotation marks
Answer
Correct Answer:
The process of interpreting characters in a string literal surrounded by double quotation marks
Note: This Question is unanswered, help us to find answer for this one
Check Answer
196. Which of the following is not true regarding scalar variable names?
Variable names that begin with an underscore or an alphabet character may have any practical length
The characters that follow variable names that begin with an underscore or alphabet character may be digits, underscores or alphabet characters
If a variable name begins with a digit, it may be of any practical length but can contain only digits
If a variable name begins with a non-alphanumeric character, it can only be one character long
Variable names can contain spaces
Answer
Correct Answer:
Variable names can contain spaces
Note: This Question is unanswered, help us to find answer for this one
Check Answer
197. Which of the following is not a rule for switches using the Getopt function?
Switches begin with a dash character (-)
Switches that do not take a parameter are set to the value 0
Switches that take a parameter may or may not have space between the switch name and the switch value
Switches are not required to be in any order
Switches are case-sensi
Answer
Correct Answer:
Switches that do not take a parameter are set to the value 0
Note: This Question is unanswered, help us to find answer for this one
Check Answer
198. Which of the following is not a type of reference variables?
Direct
Constant
Subroutine
Numeric
Symbolic
Note: This Question is unanswered, help us to find answer for this one
Check Answer
199. Which of the following executes the continue block of statements before returning execution to the top of the loop?
last
redo
bless
next
blur
Note: This Question is unanswered, help us to find answer for this one
Check Answer
200. Context in Perl can be.
conditional, referenced, literal, null
numeric, string, list, scalar
associative, numeric, scalar, sparse
binary, string, list, scalar
Boolean, numeric, string, null
Answer
Correct Answer:
numeric, string, list, scalar
Note: This Question is unanswered, help us to find answer for this one
Check Answer
201. What does the abs_path method do?
Gets the current working directory
Gets the absolute path of the parameter
Gets the absolute path of the input parameter
Gets the absolute path of the current working directory
Gets the current parameter
Answer
Correct Answer:
Gets the absolute path of the input parameter
Note: This Question is unanswered, help us to find answer for this one
Check Answer
202. The syntax of the heredoc operator is.
print <heredoc -="" marker;<="" label=""></heredoc>
select <heredoc -="" marker;<="" label=""></heredoc>
printlist heredoc -label;
printlist<heredoc -label;<br=""></here
Answer
Correct Answer:
print <heredoc -="" marker;<="" label=""></heredoc>
Note: This Question is unanswered, help us to find answer for this one
Check Answer
203. A scalar variable can contain.
only one data item at a time
several data items at a time, the number of which needs to be declared beforehand
unlimited items
two items at a time
an array of data items
Answer
Correct Answer:
only one data item at a time
Note: This Question is unanswered, help us to find answer for this one
Check Answer
204. Which of the following parameters does the printf function take?
An output file handle which is optional
A format string which can include the format codes
The variables to be formatted
All of the above
Does not take any parameters
Answer
Correct Answer:
All of the above
Note: This Question is unanswered, help us to find answer for this one
Check Answer
205. Which of the following loops is usually used to process arrays?
while
until
do
for / for
Answer
Correct Answer:
for / for
Note: This Question is unanswered, help us to find answer for this one
Check Answer
206. Which of the following begins or ends a system command string in Perl?
<font size="5">"</font>
<font size="5">'</font>
<font size="5">;</font>
<font size="5">!</font>
<font size="5">`</f
Answer
Correct Answer:
<font size="5">"</font>
Note: This Question is unanswered, help us to find answer for this one
Check Answer
207. Which of the following meta characters creates a single expression or atom?
{ }
( )
*
+
?
Note: This Question is unanswered, help us to find answer for this one
Check Answer
208. Dereferencing refers to.
accessing an array that contains a reference to another array
removing the reference
an undefined or empty reference
accessing values referred to by Perl references
a scalar variable that keeps track of where another variable is stored in memory
Answer
Correct Answer:
accessing values referred to by Perl references
Note: This Question is unanswered, help us to find answer for this one
Check Answer
209. The value assigned to an array cell must be.
a scalar value
a variable value
a scalar or a variable value that resolves to a scalar value
null
None of the above
Answer
Correct Answer:
a scalar or a variable value that resolves to a scalar value
Note: This Question is unanswered, help us to find answer for this one
Check Answer
210. What does the pattern modifier m do?
Ignores the character case when matching the pattern
Compiles the pattern and interprets it only the first time it occurs
Treats the input string as if it were a single line
Treats the input string as if it were multiple lines
Allows a comment character in the pattern
Answer
Correct Answer:
Treats the input string as if it were multiple lines
Note: This Question is unanswered, help us to find answer for this one
Check Answer
211. The syntax of assigning to an array cell is.
array=new Array(n);
scalar=@array[cellIndex]
@array[cellIndex]=scalar;
$array[cellIndex]=scalar;
$array[n]=newArray;
Answer
Correct Answer:
$array[cellIndex]=scalar;
Note: This Question is unanswered, help us to find answer for this one
Check Answer
212. What does the following compound assignment operator signify?
| =
Exclusive OR the expression on the left of the operator with the expression on the right of the operator
Logical OR the expression on the left of the operator with the expression on the right of the operator
Left shift the expression on the left of the operator by the expression on the right of the operator
Binary OR the expression on the left of the operator with the expression on the right of the operator
Append the expression on the left of the operator with the expression on the right of the operator
Answer
Correct Answer:
Binary OR the expression on the left of the operator with the expression on the right of the operator
Note: This Question is unanswered, help us to find answer for this one
Check Answer
213. What are bare words?
Comments with the # sign missing
Improperly declared variables
Operators
Character strings without surrounding quotation marks
Characters denoting a string
Answer
Correct Answer:
Character strings without surrounding quotation marks
Note: This Question is unanswered, help us to find answer for this one
Check Answer
214. The bless operator
creates references to objects that are not named
creates a link between the reference object and the class the object is created within
contains the literal name of another variable
references a subroutine
refers to literals
Answer
Correct Answer:
creates a link between the reference object and the class the object is created within
Note: This Question is unanswered, help us to find answer for this one
Check Answer
215. An atom cannot be
a single character or digit, A-Z, a-z, 0-9
an escaped meta-character
an escaped special meaning character
a regular expression enclosed in parenthesis
a meta character
Answer
Correct Answer:
an escaped meta-character
Note: This Question is unanswered, help us to find answer for this one
Check Answer
216. Which of the following is not true of labels?
A label can go on any line
A label must begin with a character followed by any combination of letters or numbers that end with a colon
Reserved words cannot be used as labels
Labels are case sensitive
A label performs the same function as the last<br>command
Answer
Correct Answer:
A label performs the same function as the last<br>command
Note: This Question is unanswered, help us to find answer for this one
Check Answer
217. what is the purpose of the `qw` keyword in the following statement: my @array = qw/apple orange grape/;
qw is used to convert all lowercase words to uppercase
it's used to order to array contents
qw is the "quote word" function used to make it easier to quote words, e.g., in generating an array of quoted words.
non of the above
it's used for matching the quoted value
Answer
Correct Answer:
qw is the "quote word" function used to make it easier to quote words, e.g., in generating an array of quoted words.
Note: This Question is unanswered, help us to find answer for this one
Check Answer
218. What does die() do?
It does not throw any exceptions
Exits the process
Sets error code as 0
Set the error code based on $! or $? if the exception is uncaught
Answer
Correct Answer:
Set the error code based on $! or $? if the exception is uncaught
Note: This Question is unanswered, help us to find answer for this one
Check Answer
219. For the string "2011/12/04" and regular expression "/(\d+)\/(\d+)\/(\d+)/", you can use $3 to return "04". What other variable can be used to return "04"?
$'
$+
$&
$`
$^
Note: This Question is unanswered, help us to find answer for this one
Check Answer
220. What does $1 hold? $x= "a walk in the park";$x=~/(.+)a/;
a walk in the p
empty string
a w
Answer
Correct Answer:
a walk in the p
Note: This Question is unanswered, help us to find answer for this one
Check Answer
221. When is begin block evaluated?
at the beginning of any script
at the end
it's evaluated as it's being called
as soon as it is defined
Answer
Correct Answer:
as soon as it is defined
Note: This Question is unanswered, help us to find answer for this one
Check Answer
222. What will be in $test variable? my $test = ( ($a,$b) = (7,7,7,5,45));
ARRAY(0x1d06760)
45
5
7
2
Note: This Question is unanswered, help us to find answer for this one
Check Answer
223. Which of the following expressions allow you to enter the perl debugger without running a program?
perl -d
perl -de0
perl -V
perl -d null
Answer
Correct Answer:
perl -de0
Note: This Question is unanswered, help us to find answer for this one
Check Answer
224. How can I read character by character from a file?
getchar @_
getchar FileHandle
getc FileHandle
getc $_
Answer
Correct Answer:
getc FileHandle
Note: This Question is unanswered, help us to find answer for this one
Check Answer
225. How can you get the current postion of the file?
tell $_;
getpostion tell FILEHANDLE;
getpos FILEHANDLE;
tell FILEHANDLE;
Answer
Correct Answer:
tell FILEHANDLE;
Note: This Question is unanswered, help us to find answer for this one
Check Answer
226. Which of the following will remove a cookie?
my $cookie1 = new CGI::Cookie( -name=>'Test', -expires=>100, -domain=>
my $cookie1 = new CGI::Cookie( -name=>'Test', -expires=>-1, -domain=>
my $cookie1 = new CGI::Cookie( -name=>'Test', -expires=>1h, -secure=>0 );
my $cookie1 = new CGI::Cookie( -name=>'Test', -expires=>, -domain=>
Answer
Correct Answer:
my $cookie1 = new CGI::Cookie( -name=>'Test', -expires=>, -domain=>
Note: This Question is unanswered, help us to find answer for this one
Check Answer
227. what is the output of $x="AGAAA"; $x=~tr/AG/C/ds; print $x;
C
AAAA
CCCCC
CGCCC
Note: This Question is unanswered, help us to find answer for this one
Check Answer
228. $b = $a++ + ++$a; What is the value of $b?
3
0
undef
1
2
Note: This Question is unanswered, help us to find answer for this one
Check Answer
229. What is the difference between require and use?
require is verified during compile time and runtime, use is verified during run time
use is verified during compile time and runtime, require is verified during run time
require is verified during compile time, use is verified during run time
require is verified during runtime, use is verified during compile time
Answer
Correct Answer:
require is verified during runtime, use is verified during compile time
Note: This Question is unanswered, help us to find answer for this one
Check Answer
230. Which of the following is a correct use of IMAP?
use Net::IMAP::Simple; $server = new Net::IMAP::Simple( 'someserver' , 'someuser', 'somepassword' );
use Net::IMAP; $server = new Net::IMAP( 'someserver', 'someuser', 'somepassword' );
use Net::IMAP::Simple; $server = new Net::IMAP::Simple( 'someserver' ); $server->login( 'someuser', 'somepassword' );
use Net::IMAP::Simple; $server = new Net::IMAP::Simple( 'someserver' ); $server->login( 'someuser', 'somepassword','some port' );
Answer
Correct Answer:
use Net::IMAP::Simple; $server = new Net::IMAP::Simple( 'someserver' ); $server->login( 'someuser', 'somepassword' );
Note: This Question is unanswered, help us to find answer for this one
Check Answer
231. What is %INC?
It contains all the inlcuded file's within the script
It's same as @INC, just stores the information in a hash instead of an array
It is used to cache the names of the files and the modules that were successfully loaded and compiled by use(), require() or do() statements
it contains all system objects
Answer
Correct Answer:
It is used to cache the names of the files and the modules that were successfully loaded and compiled by use(), require() or do() statements
Note: This Question is unanswered, help us to find answer for this one
Check Answer
232. seek FILEHANDLE, POSITION, OPTION; What's meant by option value as 0 ?
set new position plus position
sets position to the end of the file .
does not make any change
Sets the new position of the file
Answer
Correct Answer:
Sets the new position of the file
Note: This Question is unanswered, help us to find answer for this one
Check Answer
233. What should be the output of @nums = (1..10); splice(@nums, 5,5,21..25)?
1 2 3 4 5 21 22 23 24 25
1 2 3 4 21 22 23 24 25
1 2 3 4 5 21 22 23 24 25 26
1 2 3 4 5 5 21 22 23 24
Answer
Correct Answer:
1 2 3 4 5 21 22 23 24 25
Note: This Question is unanswered, help us to find answer for this one
Check Answer
234. What is a correct way to instantiate parallel processing in PERL?
my $pm = Parallel::ForkManager->new($$,50);
my $pm = ForkManager->new(50);
my $pm = Parallel::ForkManager->new(50,20);
my $pm = Parallel::ForkManager->new(50);
Answer
Correct Answer:
my $pm = Parallel::ForkManager->new(50);
Note: This Question is unanswered, help us to find answer for this one
Check Answer
235. Which list items of stat() returns the mode of the file?
4
3
6
5
Note: This Question is unanswered, help us to find answer for this one
Check Answer
236. 1 $a="cat"; 2 $$acatches="rat"; Which of following is equivalent to second line.?
$catcatches=.rat;
$catcatches=''rat";
acatcatches="rat";
acatcatches="rat"
Answer
Correct Answer:
$catcatches=''rat";
Note: This Question is unanswered, help us to find answer for this one
Check Answer
237. Perl stores numbers internally as:
all are correct
signed integers
double-precision floating-point values
none are correct
Answer
Correct Answer:
all are correct
Note: This Question is unanswered, help us to find answer for this one
Check Answer
238. How would I display an error during CGI application?
use CGI::Carp qw(Display Error)
use CGI::Carp qw(fatalsToCGI)
use CGI::Carp qw(fatalsTo Browser)
use CGI::Carp qw(On Error)
Answer
Correct Answer:
use CGI::Carp qw(fatalsTo Browser)
Note: This Question is unanswered, help us to find answer for this one
Check Answer
239. if $as=="x", then what is the output of the following? print "as".'$as'.$as.""
as$asx
asx$asx
as$as
asasx
Note: This Question is unanswered, help us to find answer for this one
Check Answer
240. A perl program file name prog.pl starts with the following line: #!/usr/bin/perl -w The file has execute permissions. What would be the difference between: (a) ./prog.pl (b) perl prog.pl
No difference
Command (b) will invoke the program without warnings.
Second command will not work
First command will not work
Answer
Correct Answer:
No difference
Note: This Question is unanswered, help us to find answer for this one
Check Answer
241. What module is used to scrape contents from website?
LWP::Simple
Data::Dumper
Net::LWP
None of these
Answer
Correct Answer:
LWP::Simple
Note: This Question is unanswered, help us to find answer for this one
Check Answer
242. What do the @- and @+ arrays do?
Store first and last command line arguments
Store start and end positions of all regular expression group captures
Store first and last index of a given array
Store first and last arguments passed to functions
Answer
Correct Answer:
Store start and end positions of all regular expression group captures
Note: This Question is unanswered, help us to find answer for this one
Check Answer
243. @values = ( "value1", "value2", ("value3", "value4") ); How does Perl store the nested list shown above?
The list is flattened by removing all internal bracketing.
The list is stored as a hierarchical list.
The list stores two values,
The list is stored as a hash with the offsets as keys to the hash.
Answer
Correct Answer:
The list is flattened by removing all internal bracketing.
Note: This Question is unanswered, help us to find answer for this one
Check Answer
244. How do I create an object?
bless [class parameter]
new [class parameter] [class name]
bless [class parameter] [class name]
class name ( [class parameter] )
Answer
Correct Answer:
bless [class parameter] [class name]
Note: This Question is unanswered, help us to find answer for this one
Check Answer
245. How can you write content using CGI?
cgiobject->header();
cgiobject->header();cgiobject->write_html();
cgiobject->header();cgiobject->start_html(); and cgiobject->end_html();
cgiobject->start_html(); and cgiobject->end_html();
Answer
Correct Answer:
cgiobject->header();cgiobject->start_html(); and cgiobject->end_html();
Note: This Question is unanswered, help us to find answer for this one
Check Answer
246. What is known as a reference to a function that is, usually, passed into another function for use?
Closures
dereference
Callback
hashreference
Note: This Question is unanswered, help us to find answer for this one
Check Answer
247. Perl -I, what is "l" meant for?
Inplace edit
Compile Perl script
Quote filename
Answer
Correct Answer:
Inplace edit
Note: This Question is unanswered, help us to find answer for this one
Check Answer
248. What would be $x after my $x = "5" x "4";
20
5555
A value of undef and an error messages.
Depends on the variable type.
Note: This Question is unanswered, help us to find answer for this one
Check Answer
249. All arguments to a subroutine are passed as:
single, flat list of scalars
hashes (associative arrays)
distinct lists, one per variable
distinct scalars
Answer
Correct Answer:
single, flat list of scalars
Note: This Question is unanswered, help us to find answer for this one
Check Answer
250. What does unshift do?
Adds an element to the end of an array
Removes an element to the end of an array
Removes an element to the beginning of an array
Adds an element to the beginning of an array
Answer
Correct Answer:
Adds an element to the beginning of an array
Note: This Question is unanswered, help us to find answer for this one
Check Answer
251. $@ is used in association with the ____ function.
main()
die()
eval()
begin block
Note: This Question is unanswered, help us to find answer for this one
Check Answer
252. What will be the @arr value after executing: my @arr = grep { $_ > 0 } map { $_ * $_ } (1, -1, 2, -2);
@arr = (1, 4, 1, 4)
@arr = (1, 2)
@arr = (1, 4)
@arr = (1, 1, 4, 4)
Answer
Correct Answer:
@arr = (1, 1, 4, 4)
Note: This Question is unanswered, help us to find answer for this one
Check Answer
253. What does Perl -T do?
use for taint checks
configuration check
threaded mode
timeout parameter
Answer
Correct Answer:
use for taint checks
Note: This Question is unanswered, help us to find answer for this one
Check Answer
254. How to create a super class object?
$class->SUPER::new(parameter)
$class->[super class]->new(parameter)
$class->[super class name]::new(parameter)
$superclass->new(parameter)
Answer
Correct Answer:
$class->SUPER::new(parameter)
Note: This Question is unanswered, help us to find answer for this one
Check Answer
255. Which takes care of garbage collection?
unlink method
_class name
DESTROY method
remove [class object]
Answer
Correct Answer:
DESTROY method
Note: This Question is unanswered, help us to find answer for this one
Check Answer
256. I can capture output of any unix command through which process?
using execute()
Using system ()
using exec () using execute ()
Using backquote
Answer
Correct Answer:
Using backquote
Note: This Question is unanswered, help us to find answer for this one
Check Answer
257. Which of the following is not used to control scoping?
local
call
my
use
package
Note: This Question is unanswered, help us to find answer for this one
Check Answer
258. What function is used to check the length of a string?
using count()
using length()
using len()
using strlen()
Answer
Correct Answer:
using length()
Note: This Question is unanswered, help us to find answer for this one
Check Answer
259. our @ISA (person); What does @ISA mean?
require person class
include person module
create a subclass person
current class inherits person class
Answer
Correct Answer:
current class inherits person class
Note: This Question is unanswered, help us to find answer for this one
Check Answer
260. How do I dereference a hash reference?
${%ref}
${$ref}
%{%ref}
%{$ref}
Note: This Question is unanswered, help us to find answer for this one
Check Answer
261. What option do I use to check the existence of a file?
"-d"
"-f"
"-s"
"-e"
Note: This Question is unanswered, help us to find answer for this one
Check Answer
262. To dereference $arrayref and then find the second element of that array, you use:
$$arrayref[1] = "man";
$arrayref->[1] = "man";
${$arrayref}[1] = "man";
all are correct
Answer
Correct Answer:
all are correct
Note: This Question is unanswered, help us to find answer for this one
Check Answer
263. What is closure referencing?
referencing hash through variable
referencing file through hash
referencing subroutines through variable
referencing array through variable
Answer
Correct Answer:
referencing subroutines through variable
Note: This Question is unanswered, help us to find answer for this one
Check Answer
264. What does $! show?
Perdioda
Warnings
Errors
Process id
Note: This Question is unanswered, help us to find answer for this one
Check Answer
265. What does append do in FTP?
Same as put but uses the STOU command.
append to the end of the remote file
Returns TRUE if the remote server supports the given command.
same as put()
Answer
Correct Answer:
append to the end of the remote file
Note: This Question is unanswered, help us to find answer for this one
Check Answer
266. The bitwise AND operator is:
|
&
||
&&
Note: This Question is unanswered, help us to find answer for this one
Check Answer
267. What's the system() success value?
-1
0
1
255
Note: This Question is unanswered, help us to find answer for this one
Check Answer
268. Which regular expression deletes all tags specified as text enclosed by "<" and ">" from a document stored in a string, but deletes nothing else?
$string =~ s/<.*?>//g;
$string =~ s/<\S*>//g;
$string =~ s/<\s*>//g;
$string =~ s/<*&>//g;
Answer
Correct Answer:
$string =~ s/<.*?>//g;
Note: This Question is unanswered, help us to find answer for this one
Check Answer
269. What must be done to pass more than one array or hash into or out of a function and have them maintain their integrity?
you put them in a list and pass this list
all answers are wrong
you pass references to them as arguments
you put them in an hash (associative array) and pass that
Answer
Correct Answer:
you pass references to them as arguments
Note: This Question is unanswered, help us to find answer for this one
Check Answer
270. You can create a reference to an existing variable or subroutine by prefixing it with a:
$
\
\\
$$
Note: This Question is unanswered, help us to find answer for this one
Check Answer
271. What statement immediately ends a subroutine?
return;
goto;
exit;
break;
Note: This Question is unanswered, help us to find answer for this one
Check Answer
272. How would you check which version of perl you are using?
perl -Verz
None of these
perl -version
perl -v
Note: This Question is unanswered, help us to find answer for this one
Check Answer
273. what is the default separator in split operator
comma
semi colon
colon
white space
Answer
Correct Answer:
white space
Note: This Question is unanswered, help us to find answer for this one
Check Answer
274. Can I call the method of a class without creating an object?
by calling new()
No
Yes, using Super class object
Yes, using :: operator
Answer
Correct Answer:
Yes, using :: operator
Note: This Question is unanswered, help us to find answer for this one
Check Answer
275. What will be the output of variable $firstVar after completion of this code line: $firstVar = substr("0123BBB789", 4, 3);
BBB
789
B789
3BB
Note: This Question is unanswered, help us to find answer for this one
Check Answer
276. How do I numericaly sort an array in decending order?
sort ($a <=> $b)
sort ($b cmp $a)
sort ($b <=> $a)
Answer
Correct Answer:
sort ($b <=> $a)
Note: This Question is unanswered, help us to find answer for this one
Check Answer
277. Which regexe matche between 1 to 4 ab's followed by a tab and an integer number?
(ab)+{4}\t\d*
(ab){1,4}\t\d+
ab[ababab]\t[0-9]
{ab,4}\t\d+
Answer
Correct Answer:
(ab){1,4}\t\d+
Note: This Question is unanswered, help us to find answer for this one
Check Answer
278. How do I lock a file?
using uflock()
using lock()
using filelock()
using flock()
Answer
Correct Answer:
using flock()
Note: This Question is unanswered, help us to find answer for this one
Check Answer
279. my @b=(1,2,3);my $a=@b;What will be the output of $a?
0
3
2
1
Note: This Question is unanswered, help us to find answer for this one
Check Answer
280. To disable a database error, what parameter is set in the database initialization?
raise_error=0
raise_error=255
raise_error=1
raise_error=-1
Answer
Correct Answer:
raise_error=0
Note: This Question is unanswered, help us to find answer for this one
Check Answer
281. Which of the following is not used for assigning a value to a variable?
&&=
.=
==
*=
Note: This Question is unanswered, help us to find answer for this one
Check Answer
282. $_ is used by default:
as the default iterator variable in a foreach loop
all are correct
by unary functions like ord and int
by list functions like print and unlink
Answer
Correct Answer:
all are correct
Note: This Question is unanswered, help us to find answer for this one
Check Answer
283. To execute blocks of code depending on whether a condition is met, you use:
the if statement
the unless statement
both are correct
Answer
Correct Answer:
both are correct
Note: This Question is unanswered, help us to find answer for this one
Check Answer
284. Which of the below would declare a global variable?
our
/g
my
~g
Note: This Question is unanswered, help us to find answer for this one
Check Answer
285. What does Perl -e on the command line do?
Die on warnings on the program coming after it
Give you the version number
Allow you to execute an expression coming immediately after.
Interpret perl from standard in
Answer
Correct Answer:
Allow you to execute an expression coming immediately after.
Note: This Question is unanswered, help us to find answer for this one
Check Answer
286. How would you remove an element from hash?
delete $hash{'key'}
remove $hash{'key'}
empty $hash{'key'}
$hash{'key'}=''
Answer
Correct Answer:
delete $hash{'key'}
Note: This Question is unanswered, help us to find answer for this one
Check Answer
287. Which of the following functions is not used for hash processing?
all are used for hash processing
each
delete
exists
Answer
Correct Answer:
all are used for hash processing
Note: This Question is unanswered, help us to find answer for this one
Check Answer
288. how would you execute a shell command from within a perl script
use the execute function , ie, execute("ls")
enclose within back ticks , ie `ls`
enclose within #{}, ie, #{ls}
use the escape function , ie escape("ls")
Answer
Correct Answer:
enclose within back ticks , ie `ls`
Note: This Question is unanswered, help us to find answer for this one
Check Answer
289. How do I close a file?
file_close fh
fclose fh
close fh
close $_
Note: This Question is unanswered, help us to find answer for this one
Check Answer
290. Which of the following functions is not used for array processing?
shift
splice
push
chop
Note: This Question is unanswered, help us to find answer for this one
Check Answer
291. Why would I include strict in PERL code?
To hide errors and warnings
When strict is in use and the package name is not used to fully qualify the variable, this error will be reported
To display warnings to the browser
To hide errors
Answer
Correct Answer:
When strict is in use and the package name is not used to fully qualify the variable, this error will be reported
Note: This Question is unanswered, help us to find answer for this one
Check Answer
292. How do I call subroutines in Perl?
sub();
&sub();
All of these
$some_object->sub();
Answer
Correct Answer:
All of these
Note: This Question is unanswered, help us to find answer for this one
Check Answer
293. What's the preferable mode of executing one CGI script?
755
766
744
776
Note: This Question is unanswered, help us to find answer for this one
Check Answer
294. How can you install a module?
copy the file
cd cpan; install [module name]
cpan; install [module name]
install [module name]
Answer
Correct Answer:
cpan; install [module name]
Note: This Question is unanswered, help us to find answer for this one
Check Answer
295. Perl has a 'goto' command.
False, the command is 'go'
False, the command is 'branch'
True
Note: This Question is unanswered, help us to find answer for this one
Check Answer
296. Perl programs have this filehandle that is automatically opened:
STDDAT
STDLOG
STDERR
STDREF
Note: This Question is unanswered, help us to find answer for this one
Check Answer
297. What does cdup () do in FTP?
shows uptime
Change the directory to the parent of the current directory.
change to any directory in any level
Change directory to the child of the current directory.
Answer
Correct Answer:
Change the directory to the parent of the current directory.
Note: This Question is unanswered, help us to find answer for this one
Check Answer
298. What will the following program do: foreach (reverse 1..10) { print; }
Syntax error.
Print nothing.
Print the numbers from 10 to 1.
Infinite loop.
Print the numbers from 1 to 10.
Answer
Correct Answer:
Print the numbers from 10 to 1.
Note: This Question is unanswered, help us to find answer for this one
Check Answer
299. What is a hash identified as?
$
@
%
&
Note: This Question is unanswered, help us to find answer for this one
Check Answer
300. What will $count= scalar keys %hashname; return?
number of elements in hash
error
executes but blank output
values of only keys in hash
Answer
Correct Answer:
number of elements in hash
Note: This Question is unanswered, help us to find answer for this one
Check Answer
301. What are the ways one can run an Unix command?
within backquote
system ()
All of these
Answer
Correct Answer:
All of these
Note: This Question is unanswered, help us to find answer for this one
Check Answer
302. What will the following code output? for ($count = 10; $count >= 1; $count--) { print "$count "; }
10 9 8 7 6 5 4 3 2
9 9 8 7 6 5 4 3 2 1
10 9 8 7 6 5 4 3 2 1
9 8 7 6 5 4 3 2 1
Answer
Correct Answer:
10 9 8 7 6 5 4 3 2 1
Note: This Question is unanswered, help us to find answer for this one
Check Answer
303. The prototype symbol for a scalar is:
$
*
%
&
Note: This Question is unanswered, help us to find answer for this one
Check Answer
304. How do you check the existence of a key in a hash?
isused $hash {'key'}
isexists $hash {'key'}
exists $hash {'key'}
isnull $hash {'key'}
Answer
Correct Answer:
exists $hash {'key'}
Note: This Question is unanswered, help us to find answer for this one
Check Answer
305. Can a pattern search be done in a split function in PERL?
Yes
No
Note: This Question is unanswered, help us to find answer for this one
Check Answer
306. Does Perl provide the defined function that allows you to check up if a variable has the undef value or not?
Yes
No
Note: This Question is unanswered, help us to find answer for this one
Check Answer
307. The for loop has few semicolon-separated expressions within its parentheses. These expressions function as:
the initialization (e.g., $i = 1;)
the condition (e.g., $i < 10;)
the re-initialization (e.g., $i++)
all are correct
Answer
Correct Answer:
all are correct
Note: This Question is unanswered, help us to find answer for this one
Check Answer
308. my $x=join(':','a','b') What will be the output of $x?
b:a
a:b
ba
ab
Note: This Question is unanswered, help us to find answer for this one
Check Answer
309. How can perl be called which gives the same functionality of "use warnings"?
perl -w
perl -warn
perl -Warn
perl -W
Note: This Question is unanswered, help us to find answer for this one
Check Answer
310. Which will check the script's syntax?
perl -check
perl -C
perl -Check
perl -c
Note: This Question is unanswered, help us to find answer for this one
Check Answer
311. Will perl be installed in Windows by default?
Yes
No
Note: This Question is unanswered, help us to find answer for this one
Check Answer
312. Unless it is the final statement in a block, every simple statement must end in:
;
nothing
end of line
.
Note: This Question is unanswered, help us to find answer for this one
Check Answer
313. Which of the following gets you an array of all numbers matched in a string?
my @numbers = $string =~ /\S+/g;
my @numbers = $string =~ /\S+/e;
my @numbers = $string =~ /\d+/g;
my @numbers = $string =~ /\W+/e;
Answer
Correct Answer:
my @numbers = $string =~ /\d+/g;
Note: This Question is unanswered, help us to find answer for this one
Check Answer
314. What is $_ ?
shows current processid
The default input and pattern-searching space.
it display errors
it displays warnings
Answer
Correct Answer:
The default input and pattern-searching space.
Note: This Question is unanswered, help us to find answer for this one
Check Answer
315. To remove any line-ending characters of each string in a @list, you use the function:
remove
trunc
chomp
deleol
Note: This Question is unanswered, help us to find answer for this one
Check Answer
316. What can be used in PERL for communicating with an FTP server?
FTP
Net::FTP
Net::SMTP
WWW::FTP
Note: This Question is unanswered, help us to find answer for this one
Check Answer
317. Which conditional statement is equivalent to "if (!)"?
ifn ()
fails ()
failure ()
unless ()
Answer
Correct Answer:
unless ()
Note: This Question is unanswered, help us to find answer for this one
Check Answer
318. You may force yourself to declare your variables by:
using &$variables;
including the 'use strict' pragma in your program
including the 'use autouse' module in your program
using &variables;
Answer
Correct Answer:
including the 'use strict' pragma in your program
Note: This Question is unanswered, help us to find answer for this one
Check Answer
319. lc function stands for?
last call();
lower case
leastcount
less than
Answer
Correct Answer:
lower case
Note: This Question is unanswered, help us to find answer for this one
Check Answer
320. $m=ucfirst("test"); What will be the output of $m?
Test
TEST
test
tesT
Note: This Question is unanswered, help us to find answer for this one
Check Answer
321. Does perl require variables be declared with a type? (ie: int, float, double, etc.)
Yes
No
Note: This Question is unanswered, help us to find answer for this one
Check Answer
322. How would you output the list of keys in a hash?
key %hash
scalar %hash
count %hash
keys %hash
Answer
Correct Answer:
keys %hash
Note: This Question is unanswered, help us to find answer for this one
Check Answer
323. What is the shebang?
%!
$!
&!
#!
@!
Note: This Question is unanswered, help us to find answer for this one
Check Answer
324. What does the "shift" function do?
Passes parameters to the subrotuines
Shifts operators bitwise
Removes the first value of an array and returns its value
Swaps array indexes
Answer
Correct Answer:
Removes the first value of an array and returns its value
Note: This Question is unanswered, help us to find answer for this one
Check Answer
325. How many scalars will the array @num have after the following command: my @days = qw (Sunday Monday Tuesday Wednesday Thursday Friday Saturday); my @num = (1..scalar @days);
2
0
1
7
Note: This Question is unanswered, help us to find answer for this one
Check Answer
326. You may call a subroutine called 'subrout' with arguments 'args', using:
subrout args;
&subrout(args);
all are correct
subrout(args);
Answer
Correct Answer:
all are correct
Note: This Question is unanswered, help us to find answer for this one
Check Answer
327. What is @INC?
it contains all the list of variables defined within the script
It contains unix's environment variables
It contains all the sources of external information
It contains a list of directories from which Perl modules and libraries can be loaded
Answer
Correct Answer:
It contains a list of directories from which Perl modules and libraries can be loaded
Note: This Question is unanswered, help us to find answer for this one
Check Answer