Professional Documents
Culture Documents
PERL PROGRAMMING
POST TRAINING QUESTIONNAIRE
Name
:
Designation:
Allotted Time: 20 mins.
For Official
Purposes
TOTAL MARKS
OBTAINED / 20
=
-v
--v
-V
-h
use ODBC
use strict
use DBI
use win32
4.
use Win32::ODBC
$database=new Win32::ODBC("DSN"[,Connect option,...]);
The above code says under windows which provides direct
access to any ODBC-compliant database including SQL Server
database products
Post-Training Assessment Sheet
a. Yes
b. No
5. If you want to add two arrays together. How would you do that?
@sumarray = (@arr1,@arr2);
a. . operator
b. X operator
c. join function
d. push function
6. select valid splicing of arrays
a. splice ARRAY, OFFSET, LENGTH, LIST
b. splice ARRAY, OFFSET, LENGTH
c. splice ARRAY, OFFSET, LIST, LENGTH
d. none of the above
7. in perl cgi program Content-type: String HTTP header defines
a.A MIME string defining the format of the content being returned
b. Checking when the information becomes invalid
c. Set the cookie passed through the string
d. invalid HTTP Header
8. Passing Information using GET method
a. The GET method sends the encoded user information appended
to the page URL itself.
b. The page and the encoded information are separated by the ?
c. The GET method is the defualt method to pass information
from a browser to the web server and it produces a long string that
appears in your browser's Location:box.
d. all the above ( a,b and c ) statements are valid
9. use Data::Dumper;
my @dates=("16/02/2014","20/01/2014","17/02/2014");
@dates =sort{join(".(split'/',$a)[2,1,0])cmp
join(".(split '/',$b)[2,1,0])}@dates;
print Dumper \@dates;
The above code print
a. To sorted wise date
b. To sorted wise month
c. To sorted wise year not month
d. none
10. if($_ = /^(\w+)\s+.*?\1$/)
Post-Training Assessment Sheet