Upwork Perl Test Questions 2023 (Free) Updated
- Context in Perl can be.
Answers:
- conditional, referenced, literal, null
- numeric, string, list, scala
- associative, numeric, scalar, sparse
- inary, string, list, scala
- Boolean, numeric, string, null
- A label, in Perl, is.
Answers:
- a marker for the Perl interprete
- a heading
- a switch statement
- the name of an operator
- a component embedded in the code
- How many times does the do statement allow you to execute the block of statements in a loop?
Answers:
- 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
- A directory handle.
Answers:
- 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
- A scalar variable can contain.
Answers:
- 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
- How are hash references created?
Answers:
- % $ reference
- $ reference = \ % hash;
- @ reference = \ % hash;
- % hash=$reference;
- $$reference= \ % hash;
- How is an array assigned to an array?
Answers:
- @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
- Non-associative operators are those that.
Answers:
- do not bind at all
- change their associativity depending on the context
- do not show precedence
- ind themselves to whichever expression they are adjacent to
- do not associate the lvalue with the expression on the right
- Dereferencing refers to:
Answers:
- 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
- Context in Perl can be:
Answers:
- conditional, referenced, literal, null
- numeric, string, list, scalar
- associative, numeric, scalar, sparse
- inary, string, list, scalar
- Boolean, numeric, string, null
- A scalar variable can contain:
Answers:
- 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
- Non-associative operators are those that:
Answers:
- 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
61 NOT Answered Yet Test Questions:
(hold on, will be updated soon)
- What does the abs_path method do?
Answers:
- Gets the current working directory
- Gets the absolute path of the paramete
- Gets the absolute path of the input paramete
- Gets the absolute path of the current working directory
- Gets the current paramete
- An atom cannot be
Answers:
- a single character or digit, A-Z, a-z, 0-9
- an escaped meta-characte
- an escaped special meaning characte
- a regular expression enclosed in parenthesis
- a meta characte
- Which of the following is not an alignment character?
Answers:
•
•
- |
- &
- #
- Which of the following translation modifiers matches all characters that are not part of the search string?
Answers:
- d
- s
- c
- x
- z
- The value assigned to an array cell must be.
Answers:
- a scalar value
- a variable value
- a scalar or a variable value that resolves to a scalar value
- null
- None of the above
- Which of the following characters denotes a comment in Perl?
Answers:
- //
- #
- /*
- &
- *
- What does the pop function do?
Answers:
- 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
- Which one of the following is a part of the if family of branching statements in Perl?
Answers:
- if
- if else
- if elsif
- if, if else, and if elsif
- None of the above
- Which of the following loops is usually used to process arrays?
Answers:
- while
- until
- do
- for / foreach
- Which of the following can replace if else?
Answers:
- ? :
- : ?
- ! :
- / ?
- ? /
- Which of the following is not a rule for switches using the Getopt function?
Answers:
- 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 orde
- Switches are case-sensitive
- What is the following code an example of?
$hitCounter=sub {print "This page has been called $hits times";};
Answers:
- Anonymous array
- Anonymous hash
- Object reference
- Subroutine
- Anonymous subroutine
- Of which of the following switch syntax options is the following code an example of?
GetOptions("extension:s");
Answers:
- 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
- What does @ARGV refer to?
Answers:
- 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
- What are bare words?
Answers:
- Comments with the # sign missing
- Improperly declared variables
- Operators
- Character strings without surrounding quotation marks
- Characters denoting a string
- What does the following error indicate?
“Can’t Locate Function in @INC”
Answers:
- 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
- Which of the following begins or ends a system command string in Perl?
Answers:
- font size=5>”</font
- font size=5>'</font
- font size=5><></font
- font size=5><!</font
- font size=5>`</font
- Dereferencing refers to.
Answers:
- accessing an array that contains a reference to another array
- emoving 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
- Which of the following is not true of labels?
Answers:
- 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 command
- Which of the following operators is associated with writing to a program?
Answers:
- +
•
•
- | filename
- filename |
- Which of the following characters is the variable designator for scalar variables?
Answers:
- @
- %
- $
- *
- &
- The syntax of the sort function without a special purpose sort subroutine is:
Answers:
- sort ( ) {$b cmp $a ;}
- lvalue=sort list
- $ name= ~tr/+/ /;
- sortDescending ( ) {$b cmp $a;}
- lvalue=sort subroutineName list;
- Which of the following meta characters creates a single expression or atom?
Answers:
- { }
- ( )
- *
- +
- ?
- What does the following compound assignment operator signify? | =
Answers:
- 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
- The keyword ‘my’ is used to declare
Answers:
- comments
- are words
- default variables
- Lexical variables
- Which of the following is not a feature of Perl?
Answers:
- Portability
- Interpreted language
- Compiled language
- Is used for CGI applications
- Was originally used to generate reports that tracked errors
- The foreach loop is usually used to process.
Answers:
- arrays and hashes
- a block of statements a number of times
- lists
- multi-dimensional arrays
- namespaces
- Which of the following is not a type of reference variables?
Answers:
- Direct
- Constant
- Subroutine
- Numeric
- Symbolic
- What does the switch syntax :f do?
Answers:
- 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
- The syntax of assigning to an array cell is.
Answers:
- array=new Array(n);
- scalar=@array[cellIndex]
- @array[cellIndex]=scalar;
- $array[cellIndex]=scalar;
- $array[n]=newArray;
- Which of the following pertains to IO: :Handle?
Answers:
- Base class for IO classes
- Interface to file-open functions
- Get the file descripto
- Interface to IO: : *classes
- Export file symbols
- The s/// function.
Answers:
- substitutes one string for another string
- eturns the first position of a substring
- eturns the last position of a substring
- eturns the number of characters of a string
- eturns or modifies a substring
- Which of the following operators has/have the highest precedence?
Answers:
- Increment/decrement
- NOT, escape, sign operator
- Dereference operator
- Exponential operator
- Parenthesis, function, quotation marks
- Which of the following Getopt::Long Configuration variables refers to an internal error flag?
Answers:
- debug
- orde
- pass_through
- null
- error
- The syntax of the heredoc operator is.
Answers:
- print >>heredoc – marker;
- print <<heredoc – marker;
- select <<heredoc – marker;
- print << heredoc -label;
- printlist <<heredoc -label;
- When are the environment variables created?
Answers:
- 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
- Which of the following file functions gets the file descriptor of a file handle?
Answers:
- fcntl
- flock
- getc
- fileno
- link
- What is meant by variable interpolation?
Answers:
- Exchanging the values of one variable with anothe
- 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
upwork test answers |
upwork test answers free |
upwork readiness test answers |
upwork readiness test answers 2022 |
upwork readiness test 2022 |
upwork test answers 2022 |
upwork skill certification test answers |
upwork skill certification test answers 2022 |
upwork rising talent test answers 2022 |
upwork readiness test answer |
upwork readiness |
answers to upwork readiness test |
upwork readiness test answers 2021 |
upwork readiness test 2022 answers |
readiness test upwork 2022 |
upwork skill certification php test answers |
upwork rising talent test answers 2021 |
upwork skill certification test answers 2021 |
upwork skill certification answers 2021 |
0 comments