Google News
logo
Perl - Quiz(MCQ)
Which function is used by perl for reversing a string?
A)
reverse
B)
rev
C)
split
D)
substr

Correct Answer :   reverse


Explanation :

The reverse function, which can operate on strings as well as arrays is used to reverse the characters in a string and return the reversed string. For example,
$x= “abcd” ;
print reverse($x) ;       / prints dcba

Advertisement