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
How can you use Perl warnings and what is the importance to use them?
Explain goto label, goto name, and goto expr?
Explain the difference between "my" and "local" variable scope declarations. ?
What are the arguments and what do they mean in perl programming?
Explain the execution of a program in perl.
What is the importance of perl warnings?
How do find the length of an array?
What is the difference between die and exit in perl?
Which functions in perl allows you to include a module file. State their differences.
How does a “grep” function perform?
Explain the default scope of variables in perl?
Is there any way to add two arrays together?
What is -> symbol in perl?
What is perl pop array function?
Why -w argument is used with perl programs?