b) In object oriented PERL the arrow -> symbol is used for creating or accessing a particular object of a class
c) Arrow operator -> is used for dereferencing references to array or hash
e.g $arr = ['1', '2' ,'3', '4'];
To retrieve the value of first element:
$val = $arr->[1];
d) All of the above are correct
Ques 2:
How do you open a file for writing?
a) open (”FH”, “>filename.dat”) || die “Can’t create the file\n”; Later use FH to perform all file related operation.
b) open (”FH”, “<filename.dat”) || die “Can’t create the file\n”; Later use FH to perform all file related operation.
c) open (”FH”, “filename.dat”) || die “Can’t create the file\n”; Later use FH to perform all file related operation.
d) All are same.
1
Expert's answer
2013-01-21T10:04:14-0500
Question 1:The correct answer is b).If you have an object $a of class MyClass, and classMyClass has property "prop", and method "meth", then one can access to them as follows: $a->prop $a->meth() Question 2: The correct answer is a), where symbol ">"is used. In the case b), with symbol "<" file will beopened for reading, while case c) is incorrect.
Numbers and figures are an essential part of our world, necessary for almost everything we do every day. As important…
APPROVED BY CLIENTS
Finding a professional expert in "partial differential equations" in the advanced level is difficult.
You can find this expert in "Assignmentexpert.com" with confidence.
Exceptional experts! I appreciate your help. God bless you!
Comments
Leave a comment