Quiz 11 -- CS 290W -- Apr 15, 99

(1) If you see the line
&fRent;
what should be in the Perl program somewhere?
(1) sub fRent {...}
(2) sub &fRent {...}
(3) sub Rent {...}
(4) sub &Rent {...}
(1)

(2)
$sOld = "Abraham Lincoln";
$sSub = "aha";
$iInd = index($sOld, $sSub);
What is $iInd?
(1) -1
(2) 5
(3) 4
(4) 3
(4)

(3)
$sOld = "antibacterial";
$sNew = substr($sOld, 3, 5);
What is $sNew?
(1) "ib"
(2) "tib"
(3) "ibact"
(4) "tibac"
(3)