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 many loop control keywords are there in perl?
How will you create a file in perl?
how to extract pin_code,phone_number,year from text file using regular expressions in perl
What is an interpolation in perl?
How can we create perl programs in unix, windows nt, macintosh and os/2 ?
What is cpan in perl?
What is the difference between localtime() and gmtime() functions?
Explain about the applications of perl?
How to print escaping characters inside a string in perl?
Explain a tell function in perl?
Explain regular expression in perl?
Explain arrays in perl.
What are the features of perl language?
What is the purpose of goto expr statement?
Differences between die and exit.