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 / uma from sswdept - hov service

$strin = "uma";
print "\n \$strin <$strin>";

$len = length($strin);
@arr = split(//,$strin);
print "\n \$len $len \@arr <@arr>";

for($i=$len-1;$i>=0;$i--)
{
print $arr[$i];
$retVal .= join(//,$arr[$i]);
print "\n retVal <$retVal> ";
}

Is This Answer Correct ?    3 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to create a directory in perl?

995


What is the use of command “use strict”?

953


What can be done for efficient parameter passing in perl?

832


Why does Perl not have overloaded functions?

974


Which has highest precedence in between list and terms? Explain?

818


Show the use of sockets for the server and client side of a conversation?

828


What are some of the key features of objects in perl?

893


Explain lexical variables.

894


What happens in dereferencing?

957


What is the use of -t?

908


Create a function that is only available inside the scope where it is defined ?

952


What are the various flags/arguments that can be used while executing a perl program?

816


Explain the different types of data perl can handle.

848


How will you access an element of a perl array?

889


Explain cpan?

910