Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

Explain strftime() function in perl?

878


What is eval function in perl?

901


What is perl unshift array function?

944


What happens in dereferencing?

957


Explain the meaning of closure in perl.

953


Demonstrate subroutines in perl with a simple example.

815


How to read a single line from a file in perl?

921


How will you open a file in a write-only mode in perl?

893


How can information be put into hashes?

912


What is the function of virtual documents in cgi programs?

917


What are the various file operations in perl. Explain with example.

873


Write a program to show the process of spawning a child process

809


What are the arguments and what do they mean in perl programming?

952


How to determine strings length in perl?

901


Which functions in Perl allows you to include a module file or a module and what is the difference between them?

932