Write a script to reverse a string without using Perl's
built in function
Answer Posted / arukumar g m
my $string="hello";
my $str;
my $i = length($string);
while($i>0) {
my $nthstr = substr($string, $i-1, 1);
$str.=$nthstr;
$i = $i-1;
}
print $str;
| Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
Write a program to decode the data in the form using cgi programming
You want to empty an array. How would you do that?
What is the different between array and hash in perl programming?
Explain regular expression in perl?
How to read a file into a hash array?
How the interpreter is used in Perl?
What is use of ‘->’ symbol?
Why Perl aliases are considered to be faster than references?
What is hash?
Explain tk?
Explain the difference between "my" and "local" variable scope declarations. ?
Explain gmtime() function in perl?
How to know whether a key exists or not in perl?
Why to use perl scripting?
Write a program to download the contents from www.perlinterview.com/answers.php website in Perl.