Write a script to reverse a string without using Perl's
built in function
Answer Posted / kiruthikau
my $i;
my $str="hello";
my @str=split('',$str);
for($i=$#str;$i>=0;$i--)
{
print $str[$i];
}
| Is This Answer Correct ? | 47 Yes | 15 No |
Post New Answer View All Answers
What is a chop() function in perl?
What interface used in PERL to connect to database? How do you connect to database in Perl?
Write a program that shows the distinction between child and parent process?
In Perl we can show the warnings using some options in order to reduce or avoid the errors. What are that options?
Explain returning values from subroutines?
Explain grooving and shortening of arrays and splicing of arrays?
How do I print the entire contents of an array with Perl?
You want to empty an array. How would you do that?
Why does Perl not have overloaded functions?
How do you you check the return code of a command in perl?
How do find the length of an array?
Explain goto label?
Explain about the applications of perl?
Define dynamic scoping.
How to know whether a key exists or not in perl?