Which file test can be done to see if a file exists and has a nonzero size?
-s
-l
-S
-k
Within Perl, which operator is used to change the working directory?
cd
chdir
pwd
wd
What is the value of @list at the end of the following program? #!/usr/local/bin/perl @list=(1,2.3); &testsub(*list); Sub testsub{ Local (*sublist)=@_; $sublist[1] = 5; }
(1,2.3)
(1,5,3)
Will produce error.
(1,4,2)
Consider the following program code: $y = 1; $x = 2; $z = 3; do { print ($y ); } while ($y eq 2); do { print ($x ); } until ($x eq 2); print ($z ); What is the result of executing this program code?
The code will output the following:123
The code will output the following: 3
The code will output the following:23
The code will output the following: 321
Which line of code represents the correct syntax to establish a reference to a database handle?
$dbh = DBI::connect("dbi:mysql:myPhoneBook");
$dbh = DBD:->connect("dbi::mysql::myPhoneBook");
$dbh = DBD::connect("mysql:dbi:myPhoneBook");
$dbh = DBI->connect("dbi:mysql:myPhoneBook");
What do the variable $? contains?
Page length of a particular output file
The input end-of-line character
The return code returned by a command called by the system function.
The error code generated by a system library routine
What do the variable $! contains?
The error code generated by a system library routine.
What argument to splice is equivalent to push (@array, @sublist) function call?
splice (@array,0.0.@sublist);
splice (@array, scalar(@array),0, @sublist);
splice (@array, 1, 0, @sublist);
None of Above
Which statement will print the capital attribute of the $kansas object?
print ("capital"=>$kansas);
print {$kansas}=>(capital);
print (capital)<={$kansas};
print $kansas->{"capital"};
Which function can be used to make sure your program exits with a nonzero status even if there a standard error?
hash
noexit
nozero
die