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
what is perl language?
What are the purpose of close(), getc() and read() functions?
what are the strategies followed for multiple form interaction in cgi programs?
Which functions in Perl allows you to include a module file or a module and what is the difference between them?
What are the advantages of perl programming?
In Perl, there are some arguments that are used frequently. What are that arguments and what do they mean?
Explain the meaning of subroutine?
How can the user execute a long command repeatedly without typing it again and again?
Explain perl. What are the advantages of programming in perl?
How to read a single line from a file in perl?
How many data types are there in perl?
What does undef function in perl?
How to know whether a key exists or not in perl?
What are the different types of perl operators?
Which has highest precedence in between list and terms? Explain?